From d9d888e732152233b04db1704dd69d7e7a2fd696 Mon Sep 17 00:00:00 2001 From: FrantisekGazo Date: Tue, 1 Mar 2022 14:00:17 +0100 Subject: [PATCH] feat/Update dependencies and add HMS support --- CHANGELOG.md | 7 + README.md | 2 +- analysis_options.yaml | 14 ++ android/build.gradle | 12 +- android/src/main/AndroidManifest.xml | 3 +- .../main/kotlin/com/exponea/ExponeaPlugin.kt | 36 +++- .../kotlin/com/exponea/ExponeaPushReceiver.kt | 20 +- .../data/ExponeaConfigurationParser.kt | 2 +- documentation/PUSH_ANDROID.md | 131 +++++++++++-- documentation/VERSION_UPDATE.md | 49 +++++ example/README.md | 5 + example/analysis_options.yaml | 14 ++ example/android/.gitignore | 3 - example/android/app/Exponea.jks | Bin 0 -> 2395 bytes example/android/app/agconnect-services.json | 74 ++++++++ example/android/app/build.gradle | 43 ++++- example/android/app/debug.keystore | Bin 2257 -> 0 bytes example/android/app/proguard-rules.pro | 10 + .../android/app/src/gms/AndroidManifest.xml | 13 ++ .../example/services/MyGmsMessageService.kt | 24 +++ .../app/src/gms/res/values/strings.xml | 3 + .../android/app/src/hms/AndroidManifest.xml | 16 ++ .../example/services/MyHmsMessageService.kt | 24 +++ .../app/src/hms/res/values/strings.xml | 3 + .../android/app/src/main/AndroidManifest.xml | 11 +- .../com/exponea/example/MainActivity.kt | 4 +- .../app/src/main/res/values/strings.xml | 3 + .../kotlin/com/exponea/example}/BaseTest.kt | 6 +- .../example}/ConfigurationChangeTest.kt | 3 +- .../com/exponea/example}/ConfigurationTest.kt | 3 +- .../com/exponea/example}/ConsentTest.kt | 3 +- .../com/exponea/example}/CustomerTest.kt | 3 +- .../kotlin/com/exponea/example}/EventTest.kt | 3 +- .../com/exponea/example}/EventTypeTest.kt | 2 +- .../com/exponea/example}/FlushModeTest.kt | 2 +- .../com/exponea/example}/HttpLogLevelTest.kt | 2 +- .../com/exponea/example}/LogLevelTest.kt | 2 +- .../com/exponea/example}/OpenedPushTest.kt | 4 +- .../com/exponea/example}/ProjectTest.kt | 3 +- .../com/exponea/example}/ReceivedPushTest.kt | 3 +- .../example}/RecommendationOptionsTest.kt | 3 +- .../exponea/example}/RecommendationTest.kt | 3 +- .../exponea/example}/TokenFrequencyTest.kt | 2 +- example/android/build.gradle | 20 +- example/android/gradlew.bat | 168 ++++++++--------- example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Podfile | 2 +- example/ios/Podfile.lock | 36 ++-- example/ios/Runner.xcodeproj/project.pbxproj | 174 +++++++++--------- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/lib/main.dart | 7 +- example/lib/page/config.dart | 52 +++--- example/lib/page/home.dart | 79 ++++---- example/lib/page/link.dart | 4 +- example/pubspec.lock | 141 ++++---------- example/pubspec.yaml | 9 +- example/test/widget_test.dart | 27 --- ios/exponea.podspec | 4 +- lib/src/data/util/object.dart | 2 +- lib/src/platform/method_channel.dart | 23 +-- pubspec.lock | 41 ++++- pubspec.yaml | 11 +- test/unit/data/configuration_change_test.dart | 10 +- test/unit/data/configuration_test.dart | 8 +- test/unit/data/consent_test.dart | 8 +- test/unit/data/customer_test.dart | 10 +- test/unit/data/event_test.dart | 8 +- test/unit/data/event_type_test.dart | 4 +- test/unit/data/flush_mode_test.dart | 4 +- test/unit/data/http_log_level_test.dart | 4 +- test/unit/data/log_level_test.dart | 4 +- .../data/notification_importance_test.dart | 4 +- test/unit/data/project_test.dart | 14 +- test/unit/data/push_opened_test.dart | 16 +- test/unit/data/push_received_test.dart | 8 +- test/unit/data/push_type_test.dart | 4 +- test/unit/data/recommendation_test.dart | 20 +- test/unit/data/token_frequency_test.dart | 4 +- 78 files changed, 932 insertions(+), 575 deletions(-) create mode 100644 analysis_options.yaml create mode 100644 documentation/VERSION_UPDATE.md create mode 100644 example/analysis_options.yaml create mode 100644 example/android/app/Exponea.jks create mode 100644 example/android/app/agconnect-services.json delete mode 100644 example/android/app/debug.keystore create mode 100644 example/android/app/src/gms/AndroidManifest.xml create mode 100644 example/android/app/src/gms/kotlin/com/exponea/example/services/MyGmsMessageService.kt create mode 100644 example/android/app/src/gms/res/values/strings.xml create mode 100644 example/android/app/src/hms/AndroidManifest.xml create mode 100644 example/android/app/src/hms/kotlin/com/exponea/example/services/MyHmsMessageService.kt create mode 100644 example/android/app/src/hms/res/values/strings.xml create mode 100644 example/android/app/src/main/res/values/strings.xml rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/BaseTest.kt (83%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/ConfigurationChangeTest.kt (97%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/ConfigurationTest.kt (97%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/ConsentTest.kt (96%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/CustomerTest.kt (96%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/EventTest.kt (96%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/EventTypeTest.kt (96%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/FlushModeTest.kt (96%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/HttpLogLevelTest.kt (96%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/LogLevelTest.kt (96%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/OpenedPushTest.kt (91%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/ProjectTest.kt (96%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/ReceivedPushTest.kt (92%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/RecommendationOptionsTest.kt (96%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/RecommendationTest.kt (95%) rename {android/src/test/kotlin/com/exponea/data => example/android/app/src/test/kotlin/com/exponea/example}/TokenFrequencyTest.kt (96%) delete mode 100644 example/test/widget_test.dart diff --git a/CHANGELOG.md b/CHANGELOG.md index 2045cd4..4c83cef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ ## Release Notes +## Release Notes for 1.0.0 +#### March 23, 2022 +* Features + * Flutter SDK upgraded to 2.10 + * Native Android SDK updated to 3.0.3 - [Android SDK Release notes](https://github.com/exponea/exponea-android-sdk/blob/3.0.3/Documentation/RELEASE_NOTES.md) + * Native iOS SDK updated to 2.11.3 - [iOS SDK Release notes](https://github.com/exponea/exponea-ios-sdk/blob/2.11.3/Documentation/RELEASE_NOTES.md) + ## Release Notes for 0.2.1 #### August 12, 2021 * Fixes diff --git a/README.md b/README.md index a481662..000478d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Flutter Exponea SDK - Beta version +# Flutter Exponea SDK Flutter Exponea SDK allows your application to interact with the [Exponea](https://exponea.com/) Customer Data & Experience Platform. Exponea empowers B2C marketers to raise conversion rates, improve acquisition ROI, and maximize customer lifetime value. Flutter SDK is implemented as a wrapper around [native Android SDK](https://github.com/exponea/exponea-android-sdk) and [native iOS SDK](https://github.com/exponea/exponea-ios-sdk). diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..f41ef48 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,14 @@ +include: package:flutter_lints/flutter.yaml + +linter: + rules: + avoid_void_async: true + parameter_assignments: true + prefer_final_in_for_each: true + # override defaults from flutter_lints : + avoid_renaming_method_parameters: false + unnecessary_this: false + +analyzer: + errors: + parameter_assignments: error diff --git a/android/build.gradle b/android/build.gradle index 7347169..188d476 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,15 +4,15 @@ version '1.0.0-SNAPSHOT' buildscript { ext { androidGradlePluginVersion = '4.1.0' - kotlinVersion = '1.3.50' + kotlinVersion = '1.5.30' - exponeaSdkVersion = '2.9.5' + exponeaSdkVersion = '3.0.3' gsonVersion = '2.8.6' } repositories { google() - jcenter() + mavenCentral() } dependencies { @@ -24,7 +24,7 @@ buildscript { rootProject.allprojects { repositories { google() - jcenter() + mavenCentral() } } @@ -32,7 +32,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 30 + compileSdkVersion 31 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -47,6 +47,4 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" implementation "com.exponea.sdk:sdk:$exponeaSdkVersion" implementation "com.google.code.gson:gson:$gsonVersion" - - testImplementation 'junit:junit:4.12' } diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 52f8fbd..7366138 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -3,9 +3,8 @@ - - + ?, + manager: NotificationManager, + showNotification: Boolean = true + ) { + Log.d(TAG, "handleRemoteMessage()") + Exponea.handleRemoteMessage(applicationContext, messageData, manager, showNotification) + } + + fun trackGmsPushToken(token: String) { + Log.d(TAG, "trackGmsPushToken($token)") + Exponea.trackPushToken(token) + } + + fun trackHmsPushToken(token: String) { + Log.d(TAG, "trackHmsPushToken($token)") + Exponea.trackHmsPushToken(token) + } + + fun handleNewGmsToken(context: Context, token: String) { + Log.d(TAG, "handleNewGmsToken($token)") + Exponea.handleNewToken(context, token) + } + + fun handleNewHmsToken(context: Context, token: String) { + Log.d(TAG, "handleNewHmsToken($token)") + Exponea.handleNewHmsToken(context, token) } } diff --git a/android/src/main/kotlin/com/exponea/ExponeaPushReceiver.kt b/android/src/main/kotlin/com/exponea/ExponeaPushReceiver.kt index 2eed037..999fcca 100644 --- a/android/src/main/kotlin/com/exponea/ExponeaPushReceiver.kt +++ b/android/src/main/kotlin/com/exponea/ExponeaPushReceiver.kt @@ -5,11 +5,10 @@ import android.content.Context import android.content.Intent import com.exponea.data.OpenedPush import com.exponea.data.PushAction +import com.exponea.sdk.ExponeaExtras import com.exponea.sdk.models.NotificationAction -import com.exponea.sdk.services.ExponeaPushReceiver import com.google.gson.Gson import com.google.gson.reflect.TypeToken -import java.lang.RuntimeException class ExponeaPushReceiver : BroadcastReceiver() { /** @@ -20,20 +19,17 @@ class ExponeaPushReceiver : BroadcastReceiver() { */ override fun onReceive(context: Context, intent: Intent) { val action = when (intent.action) { - ExponeaPushReceiver.ACTION_CLICKED -> PushAction.APP - ExponeaPushReceiver.ACTION_DEEPLINK_CLICKED -> PushAction.DEEPLINK - ExponeaPushReceiver.ACTION_URL_CLICKED -> PushAction.WEB + ExponeaExtras.ACTION_CLICKED -> PushAction.APP + ExponeaExtras.ACTION_DEEPLINK_CLICKED -> PushAction.DEEPLINK + ExponeaExtras.ACTION_URL_CLICKED -> PushAction.WEB else -> throw RuntimeException("Unknown push notification action ${intent.action}") } - val url = (intent.getSerializableExtra(ExponeaPushReceiver.EXTRA_ACTION_INFO) as? NotificationAction)?.url - val pushData = intent.getSerializableExtra(ExponeaPushReceiver.EXTRA_CUSTOM_DATA) as Map + + val actionInfo = intent.getSerializableExtra(ExponeaExtras.EXTRA_ACTION_INFO) as? NotificationAction + val url = actionInfo?.url + val pushData = intent.getSerializableExtra(ExponeaExtras.EXTRA_CUSTOM_DATA) as Map val additionalDataType = object : TypeToken?>() {}.getType() val additionalData = Gson().fromJson(pushData["attributes"], additionalDataType) as Map? OpenedPushStreamHandler.handle(OpenedPush(action, url, additionalData)) - - if (intent.action == ExponeaPushReceiver.ACTION_CLICKED) { - val actionIntent = context.packageManager.getLaunchIntentForPackage(context.packageName) - context.startActivity(actionIntent) - } } } diff --git a/android/src/main/kotlin/com/exponea/data/ExponeaConfigurationParser.kt b/android/src/main/kotlin/com/exponea/data/ExponeaConfigurationParser.kt index 09bd95a..857c122 100644 --- a/android/src/main/kotlin/com/exponea/data/ExponeaConfigurationParser.kt +++ b/android/src/main/kotlin/com/exponea/data/ExponeaConfigurationParser.kt @@ -8,7 +8,7 @@ import com.exponea.sdk.models.ExponeaProject import java.lang.Exception @Suppress("UNCHECKED_CAST") -internal class ExponeaConfigurationParser { +class ExponeaConfigurationParser { fun parseConfig(map: Map): ExponeaConfiguration { return ExponeaConfiguration().apply { projectToken = map.getRequired("projectToken") diff --git a/documentation/PUSH_ANDROID.md b/documentation/PUSH_ANDROID.md index f22785c..3f57664 100644 --- a/documentation/PUSH_ANDROID.md +++ b/documentation/PUSH_ANDROID.md @@ -3,27 +3,133 @@ We rely on our native SDK to do push tracking. For more complex scenarios(multip > Exponea Android SDK contains self-check functionality to help you successfully setup push notifications. Self-check will try to track push token, request Exponea backend to send silent push to the device and check the app is ready to open push notifications. To enable self-check call `ExponeaPlugin().checkPushSetup()` **before** configuring the SDK. -## Integrating Firebase to your project -To send/receive push notifications you have to setup Firebase project. [Official Firebase documentation](https://firebase.google.com/docs/android/setup#console) describes this process. You'll need to create a project in Firebase console, add generated `google-services.json` to your app and update gradle scripts. +## Push Integrations +Exponea Android SDK supports these integrations: -> When following the Firebase documentation, the root of your Android project is `/android` +- [Standard (Firebase) integration](#firebase-integration) +- [Huawei integration](#huawei-integration) + +## Firebase integration + +### Integrating Firebase into your project +To send/receive push notifications, you have to set up the Firebase project. [Official Firebase documentation](https://firebase.google.com/docs/android/setup#console) describes this process. You'll need to create a project in the Firebase console, add generated `google-services.json` to your app and update Gradle scripts. + +> When following the Firebase documentation, the root of your Android project is `/android`. #### Checklist: - - `google-services.json` file downloaded from Firebase console is in the **android/app** folder of your Android project e.g. *android/app/google-services.json* + - `google-services.json` file downloaded from the Firebase console is in the **android/app** folder of your Android project e.g., *android/app/google-services.json* - your **android/app** folder gradle build file(*android/app/build.gradle*) contains `apply plugin: 'com.google.gms.google-services'` - your **android** folder gradle build file(*android/build.gradle*) has `classpath 'com.google.gms:google-services:X.X.X'` listed in build script dependencies. + +### Passing token and messages to Exponea SDK +To handle incomming push messages, you will have to create your `FirebaseMessagingService` implementation and register it in your `AndroidManifest.xml`. Then, call `handleRemoteMessage` in `onMessageReceived` method and `handleNewGmsToken` in `onNewToken` method, like in example code below: + +```kotlin +import android.app.NotificationManager +import android.content.Context +import com.exponea.ExponeaPlugin +import com.google.firebase.messaging.FirebaseMessagingService +import com.google.firebase.messaging.RemoteMessage + +class MessageService : FirebaseMessagingService() { + private val notificationManager by lazy { + getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager + } + + override fun onMessageReceived(message: RemoteMessage) { + super.onMessageReceived(message) + ExponeaPlugin.handleRemoteMessage(applicationContext, message.data, notificationManager) + } + + override fun onNewToken(token: String) { + super.onNewToken(token) + ExponeaPlugin.handleNewGmsToken(applicationContext, token) + } +} +``` + +Registering in AndroidManifest.xml +```xml +... + + + + + + + + ... +``` -## Setting the Firebase server key in the Exponea web app -You'll need to set the Firebase server key so Exponea can use it to send push notification to your application. Our native Android has a [guide describing how to do so](https://github.com/exponea/exponea-android-sdk/blob/develop/Guides/FIREBASE.md). +### Setting the Firebase server key in the Exponea web app +You'll need to set the Firebase server key so Exponea can use it to send push notifications to your application. Our native Android has a [guide describing how to do so](https://github.com/exponea/exponea-android-sdk/blob/develop/Guides/FIREBASE.md). + +### That's it +After these steps, you should be able to receive push notifications from Exponea. To learn how to send one, check a [Sending Push notifications guide](./PUSH_SEND.md). -## That's it -After these steps you should be able to receive push notifications from Exponea. To learn how to send one, check a [Sending Push notifications guide](./PUSH_SEND.md). +## Huawei integration +Newer phones manufactured by [Huawei](https://huaweimobileservices.com/) come with Huawei Mobile Services (HMS). It's a service used to deliver push _instead of_ Google's Firebase Cloud Messaging (FCM). + +### Integrating HMS into your project +To send/receive push notifications, you have to: +1. register and set up a [Huawei Developer account](https://developer.huawei.com/consumer/en/console) +2. create a project and App in AppGallery Connect +3. generate and configure a Signing Certificate +4. enable push kit in AppGallery Connect APIs +5. update Gradle scripts and add generated `agconnect-services.json` to your app +6. configure the Signing Information in your app + +Steps 2-6 are described in detail in the official [Huawei documentation](https://developer.huawei.com/consumer/en/codelab/HMSPreparation/index.html#0) + +### Passing token and messages to Exponea SDK +To handle incomming push messages, you will have to create your `HmsMessageService` implementation and register it in your `AndroidManifest.xml`. Then, call `handleRemoteMessage` in `onMessageReceived` method and `handleNewHmsToken` in `onNewToken` method, like in example code below: + +```kotlin +import android.app.NotificationManager +import android.content.Context +import com.exponea.ExponeaPlugin +import com.huawei.hms.push.HmsMessageService +import com.huawei.hms.push.RemoteMessage + +class MessageService : HmsMessageService() { + + private val notificationManager by lazy { + getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager + } + + override fun onMessageReceived(message: RemoteMessage) { + super.onMessageReceived(message) + ExponeaPlugin.handleRemoteMessage(applicationContext, message.dataOfMap, notificationManager) + } + + override fun onNewToken(token: String) { + super.onNewToken(token) + ExponeaPlugin.handleNewHmsToken(applicationContext, token) + } +} +``` +Registering in AndroidManifest.xml +```xml +... + + + + + + + + + ... +``` + +### That's it +After these steps, you should be able to receive push notifications from Exponea. To learn how to send one, check a [Sending Push notifications guide](./PUSH_SEND.md). ## Deeplinking -You can use `ExponeaPlugin().openedPushStream` to define a listener that will respond to push notifications. In case you'd like to use deeplinking, you'll need to update your `AndroidManifest` in `android/src/main` a bit. +You can use `ExponeaPlugin().openedPushStream` to define a listener that will respond to push notifications. If you'd like to use deep-linking, you'll need to update your `AndroidManifest` in `android/src/main` a bit. -### Set activity to to single task launch mode -By default Android will launch a new activity for your application when deeplink is opened, you want to override this by setting `android:launchMode="singleTask"` for your main activity. +### Set activity to single task launch mode +By default, Android will launch a new activity for your application when a deep-link is opened. You want to override this by setting `android:launchMode="singleTask"` for your main activity. ``` xml ... diff --git a/documentation/VERSION_UPDATE.md b/documentation/VERSION_UPDATE.md new file mode 100644 index 0000000..f59b922 --- /dev/null +++ b/documentation/VERSION_UPDATE.md @@ -0,0 +1,49 @@ +# Version update +This guide will help you upgrade your Exponea SDK to the new version. + +## Updating from version 0.x.x to 1.x.x +Changes you will need to do when updating Exponea SDK to version 1 and higher are related to firebase push notifications. + +### Changes regarding FirebaseMessagingService +We decided not to include the implementation of FirebaseMessagingService in our SDK since we want to keep it as small as possible and avoid including the libraries that are not essential for its functionality. SDK no longer has a dependency on the firebase library. Changes you will need to do are as follows: + +1. You will need to implement `FirebaseMessagingService` on your android application side. +2. Call `ExponeaPlugin.handleRemoteMessage` when a message is received +3. Call `ExponeaPlugin.handleNewGmsToken` when a token is obtained +4. Register this service in your `AndroidManifest.xml` + +```kotlin +import android.app.NotificationManager +import android.content.Context +import com.exponea.ExponeaPlugin +import com.google.firebase.messaging.FirebaseMessagingService +import com.google.firebase.messaging.RemoteMessage + +class MessageService : FirebaseMessagingService() { + private val notificationManager by lazy { + getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager + } + + override fun onMessageReceived(message: RemoteMessage) { + super.onMessageReceived(message) + ExponeaPlugin.handleRemoteMessage(applicationContext, message.data, notificationManager) + } + + override fun onNewToken(token: String) { + super.onNewToken(token) + ExponeaPlugin.handleNewGmsToken(applicationContext, token) + } +} +``` + +```xml +... + + + + + + + + ... +``` \ No newline at end of file diff --git a/example/README.md b/example/README.md index 2c2016c..95b7945 100644 --- a/example/README.md +++ b/example/README.md @@ -2,6 +2,11 @@ Demonstrates how to use the exponea plugin. +# flavors + +This example application contains 2 flavors: `gms` and `hms`. +So make to use `---flavor gms` or `--flavor hms` when running the app. + ## Getting Started This project is a starting point for a Flutter application. diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml new file mode 100644 index 0000000..f41ef48 --- /dev/null +++ b/example/analysis_options.yaml @@ -0,0 +1,14 @@ +include: package:flutter_lints/flutter.yaml + +linter: + rules: + avoid_void_async: true + parameter_assignments: true + prefer_final_in_for_each: true + # override defaults from flutter_lints : + avoid_renaming_method_parameters: false + unnecessary_this: false + +analyzer: + errors: + parameter_assignments: error diff --git a/example/android/.gitignore b/example/android/.gitignore index 0a741cb..26bd9ae 100644 --- a/example/android/.gitignore +++ b/example/android/.gitignore @@ -1,8 +1,5 @@ -gradle-wrapper.jar /.gradle /captures/ -/gradlew -/gradlew.bat /local.properties GeneratedPluginRegistrant.java diff --git a/example/android/app/Exponea.jks b/example/android/app/Exponea.jks new file mode 100644 index 0000000000000000000000000000000000000000..e99b86bb638f4f77bef71b7fbcc911eb5f7f9f21 GIT binary patch literal 2395 zcmY+EX*3iH8^_IJ29tG6c42IjZ48r1WUFh*mXyer5K1#y#xBj4G8&8_B1B}*p3t>r zyWF94Lk!hel2Bb)8@Km8?|bjLAD;7^^Z)&y=i?7e5_AIsKxmSn7)0#Kh0d3hjAV4`Wq$zkY;YM76mwc&Qff9dHdEAlVSyn(D%P*5MQtDT)b6I~ITN;v>bo(| zp~MHw!2RcQ;Xl8 zKOc3CJb?J%;8~~VpdOgM3al;gddQ16aB_HT^YC`!ayMv3P{-ife(%aXAW01qvk#}I-ZwZm zflAPt#rcu2^N+MSzh&lljogiWPT_=e%f;YY?E zd;Hj>v~cBnbwMqeP5!P9_HPm|B^Kcynb(@DuLqeG!^a{q{+9}B0=E^V&)t`E%e!B5 z{dUc;uJ6jA|EV;i*7I^u6f0u>hkd`n)np!a+(FWPHJ>gTva`@9mw zjL5+}FLqc!o<^H8)llsW(Rn8?ENWEP6`M;)&~s`8nrgEvf5;2Oa z3!OV;hu>cPB8fM5vLTw4hccw9wr6QhQKYx6?i#5d-n2$noF1Gc@7Bf~dB^KJY~b6K z5=_jl;n;a6TQp$8Odam9TDmeb|HSseEN@)kldgW~*%0*nNfFhf+j*_PTR!AajE4UY zVeT~?-;9r|mP$aF^s$~3nuJro}vg+~gbsOD1C5Nk9 z;L%btr;e~DquDoN_syGN;i5hbSG89h`~w{hbl{jJ^HIQ6X@PP*RPeYxZHv;7`uemM zZ(rmiOolC>*_QOoeWg_E8!*^P)PYT%Sywkdud!t(_q>%1rW2L11&D44egaPG)h;I_ zQmu0c7jhnod&FR>?^=hTl0&T2qR;B4yiF6YqH?>NYe7Lcj0gSXP5iN{oQ(^!sff=T z8gM7JxLDs!SjCKumB(P2<@pTJ4y1Ej!Q7C#eSdA1gHS@l4IgwGFSew01%G`dT_!6- zJ`4A?=Wu)YVR*nRi)VGYQ0clUEvGhi{V3~mHz<uzk_!-3j0enAK*gpjDFS|niV^{L6E>X1(|3$BkZl?d@V@FS^d+z_WYZ3{B z(}=4*CZ?!x>OOty(B!9nSS*eqZKDugl$@yZ07kZQ*(iCbw#k*fGbLS@gVArI95i5r z7q-*dxRyv4x>6daltI;9_BpBTxZ!-)#Y;kjw(KWMyTu)dv(UW~#H?rMU1qID!0Ac7 zN*1<^E`0Biz+t`1=J{3cAFF!kyGfk2E0MC-OM`&o?$x`UAhql>Lu1kObkqH_nwxh^ z7J}lf@8?fBb$DNGLg;8tjW^Guad3G_6F7884uhjt@G=a;-UeOfT07A(x))h#{G<5EGZR9dSq5ohA3XDF3f78sS{=k-auvNjMO z!tl#o+u2BMcrDA(sV0SRuEX?#Kc$T`c;B|l-$nxO?(}vwfa(UjSh=y19F=$RYz~Lf zHi8_vs;Gb3Fj|hS^C)pT-gqz9kkr>#S*&|A$1mM(l6$#a=c6;rJlEtH?`kG!o3dZe zsX648lrP|!l{dHE_H`P2J9v2MrTCW+nC!Cc{`(X%mX*Md`Pz>u&8^w7GS*aRR~Q&h zN(**1+%>5;EhcNlMsy;!Y(Kd~8+kVp1_znC?l%zqH3&GrS5lH^#7zmjh~G(EL&kyK z$l7H?0yAl?^H4RHgOWDFpd}=xFTTy2yF-Bfm}DS*kM7pd{;aZWvzxA9b@)T#VA*B; z#;{-3O47Z}Sg4~YWUSj+bI6KSzOFg|PMD-kbS91enlMbsSbtx&s>|uVeEnMhxVK&z z!Nz$R60DhWva|A;SJ0KSYVb4C!lWlpTAJ40X!Bk#E+C4|92&2>rqFOrU2?MRltDHi zXzCz`R$iWdE~L<_!T))S>(fVzOl-DE6IJPD3wy#5y3M@9H{^cNR2*D?YLsh%l0->s zzE;Cq!#{ZJdFm|;0RoFHL*;bqAz4~+n(Sop7103WZ7TGgtP+}zK8{vK3qts{L_k1U zem=0Ilggs|v>27$7Gv4Y`<&`54}atemSi?3@3i1Ttci5lqIMINRFoix1_S|Ug?|Bz CS4(05 literal 0 HcmV?d00001 diff --git a/example/android/app/agconnect-services.json b/example/android/app/agconnect-services.json new file mode 100644 index 0000000..b2661ec --- /dev/null +++ b/example/android/app/agconnect-services.json @@ -0,0 +1,74 @@ +{ + "agcgw":{ + "backurl":"connect-dre.hispace.hicloud.com", + "url":"connect-dre.dbankcloud.cn", + "websocketbackurl":"connect-ws-dre.hispace.dbankcloud.com", + "websocketurl":"connect-ws-dre.hispace.dbankcloud.cn" + }, + "agcgw_all":{ + "CN":"connect-drcn.dbankcloud.cn", + "CN_back":"connect-drcn.hispace.hicloud.com", + "DE":"connect-dre.dbankcloud.cn", + "DE_back":"connect-dre.hispace.hicloud.com", + "RU":"connect-drru.dbankcloud.cn", + "RU_back":"connect-drru.hispace.hicloud.com", + "SG":"connect-dra.dbankcloud.cn", + "SG_back":"connect-dra.hispace.hicloud.com" + }, + "client":{ + "cp_id":"5190421000024647787", + "product_id":"736430079245957670", + "client_id":"699887186287281088", + "client_secret":"2B8514CF138C6FE78912D20F6F23199B7C7BDEC32D98CC7ABD942CAC2A78B4B3", + "project_id":"736430079245957670", + "app_id":"104661225", + "api_key":"CwEAAAAA0otl+rs1I1lSYRubaxM0QS+eSC9Sr5pHt8k23l1ev3cTNPcH0tbpJ9N8lx3BJbouHxB2knDEv7bNmeZqGdyrRv+M5+E=", + "package_name":"com.exponea.example" + }, + "oauth_client":{ + "client_id":"104661225", + "client_type":1 + }, + "app_info":{ + "app_id":"104661225", + "package_name":"com.exponea.example" + }, + "service":{ + "analytics":{ + "collector_url":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn", + "collector_url_ru":"datacollector-drru.dt.hicloud.com,datacollector-drru.dt.dbankcloud.cn", + "collector_url_sg":"datacollector-dra.dt.hicloud.com,datacollector-dra.dt.dbankcloud.cn", + "collector_url_de":"datacollector-dre.dt.hicloud.com,datacollector-dre.dt.dbankcloud.cn", + "collector_url_cn":"datacollector-drcn.dt.hicloud.com,datacollector-drcn.dt.dbankcloud.cn", + "resource_id":"p1", + "channel_id":"" + }, + "search":{ + "url":"https://search-dre.cloud.huawei.com" + }, + "cloudstorage":{ + "storage_url":"https://ops-dre.agcstorage.link" + }, + "ml":{ + "mlservice_url":"ml-api-dre.ai.dbankcloud.com,ml-api-dre.ai.dbankcloud.cn" + } + }, + "region":"DE", + "configuration_version":"3.0", + "appInfos":[ + { + "package_name":"com.exponea.example", + "client":{ + "app_id":"104661225" + }, + "app_info":{ + "package_name":"com.exponea.example", + "app_id":"104661225" + }, + "oauth_client":{ + "client_type":1, + "client_id":"104661225" + } + } + ] +} \ No newline at end of file diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index e5688db..47b29d0 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -42,24 +42,34 @@ android { } signingConfigs { - debug { - storeFile file('debug.keystore') - storePassword 'android' - keyAlias 'androiddebugkey' - keyPassword 'android' + config { + // Set the parameters based on the actual signing information. + storeFile file('Exponea.jks') + storePassword 'Exponea' + keyPassword 'Exponea' + keyAlias 'key0' } } - buildTypes { debug { - signingConfig signingConfigs.debug + signingConfig signingConfigs.config } release { // Caution! In production, you need to generate your own keystore file. - signingConfig signingConfigs.debug + signingConfig signingConfigs.config proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } + + flavorDimensions "messagingService" + productFlavors { + gms { + dimension = "messagingService" + } + hms { + dimension = "messagingService" + } + } } flutter { @@ -69,6 +79,21 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" implementation "com.android.support:multidex:$multidexVersion" + + gmsImplementation "com.google.firebase:firebase-messaging:$firebaseVersion" + hmsImplementation "com.huawei.agconnect:agconnect-core:$agconnectVersion" + hmsImplementation "com.huawei.hms:push:$hmsVersion" + + // tests : + testImplementation 'junit:junit:4.12' + testImplementation 'com.exponea.sdk:sdk:3.0.3' + testImplementation 'com.google.code.gson:gson:2.8.6' } -apply plugin: 'com.google.gms.google-services' + +if (getGradle().getStartParameter().getTaskRequests().toString().toLowerCase().contains("gms")) { + apply plugin: 'com.google.gms.google-services' +} +if (getGradle().getStartParameter().getTaskRequests().toString().toLowerCase().contains("hms")) { + apply plugin: 'com.huawei.agconnect' +} \ No newline at end of file diff --git a/example/android/app/debug.keystore b/example/android/app/debug.keystore deleted file mode 100644 index 364e105ed39fbfd62001429a68140672b06ec0de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2257 zcmchYXEfYt8;7T1^dLH$VOTZ%2NOdOH5j5LYLtZ0q7x-V8_6gU5)#7dkq{HTmsfNq zB3ZqcAxeY^G10@?efK?Q&)M(qInVv!xjx+IKEL}p*K@LYvIzo#AZG>st5|P)KF1_Z;y){W{<7K{nl!CPuE z_^(!C(Ol0n8 zK13*rzAtW>(wULKPRYLd7G18F8#1P`V*9`(Poj26eOXYyBVZPno~Cvvhx7vPjAuZo zF?VD!zB~QG(!zbw#qsxT8%BSpqMZ4f70ZPn-3y$L8{EVbbN9$H`B&Z1quk9tgp5FM zuxp3pJ0b8u|3+#5bkJ4SRnCF2l7#DyLYXYY8*?OuAwK4E6J{0N=O3QNVzQ$L#FKkR zi-c@&!nDvezOV$i$Lr}iF$XEcwnybQ6WZrMKuw8gCL^U#D;q3t&HpTbqyD%vG=TeDlzCT~MXUPC|Leb-Uk+ z=vnMd(|>ld?Fh>V8poP;q;;nc@en$|rnP0ytzD&fFkCeUE^kG9Kx4wUh!!rpjwKDP zyw_e|a^x_w3E zP}}@$g>*LLJ4i0`Gx)qltL}@;mDv}D*xR^oeWcWdPkW@Uu)B^X&4W1$p6}ze!zudJ zyiLg@uggoMIArBr*27EZV7djDg@W1MaL+rcZ-lrANJQ%%>u8)ZMWU@R2qtnmG(acP z0d_^!t>}5W zpT`*2NR+0+SpTHb+6Js4b;%LJB;B_-ChhnU5py}iJtku*hm5F0!iql8Hrpcy1aYbT z1*dKC5ua6pMX@@iONI?Hpr%h;&YaXp9n!ND7-=a%BD7v&g zOO41M6EbE24mJ#S$Ui0-brR5ML%@|ndz^)YLMMV1atna{Fw<;TF@>d&F|!Z>8eg>>hkFrV)W+uv=`^F9^e zzzM2*oOjT9%gLoub%(R57p-`TXFe#oh1_{&N-YN z<}artH|m=d8TQuKSWE)Z%puU|g|^^NFwC#N=@dPhasyYjoy(fdEVfKR@cXKHZV-`06HsP`|Ftx;8(YD$fFXumLWbGnu$GMqRncXYY9mwz9$ap zQtfZB^_BeNYITh^hA7+(XNFox5WMeG_LtJ%*Q}$8VKDI_p8^pqX)}NMb`0e|wgF7D zuQACY_Ua<1ri{;Jwt@_1sW9zzdgnyh_O#8y+C;LcZq6=4e^cs6KvmK@$vVpKFGbQ= z$)Eux5C|Fx;Gtmv9^#Y-g@7Rt7*eLp5n!gJmn7&B_L$G?NCN`AP>cXQEz}%F%K;vUs{+l4Q{}eWW;ATe2 zqvXzxoIDy(u;F2q1JH7Sf;{jy_j})F+cKlIOmNfjBGHoG^CN zM|Ho&&X|L-36f}Q-obEACz`sI%2f&k>z5c$2TyTSj~vmO)BW~+N^kt`Jt@R|s!){H ze1_eCrlNaPkJQhL$WG&iRvF*YG=gXd1IyYQ9ew|iYn7r~g!wOnw;@n42>enAxBv*A zEmV*N#sxdicyNM=A4|yaOC5MByts}s_Hpfj|y<6G=o=!3S@eIFKDdpR7|FY>L&Wat&oW&cm&X~ z5Bt>Fcq(fgnvlvLSYg&o6>&fY`ODg4`V^lWWD=%oJ#Kbad2u~! zLECFS*??>|vDsNR&pH=Ze0Eo`sC_G`OjoEKVHY|wmwlX&(XBE<@sx3Hd^gtd-fNwUHsylg06p`U2y_={u}Bc + + + + + + + + + + \ No newline at end of file diff --git a/example/android/app/src/gms/kotlin/com/exponea/example/services/MyGmsMessageService.kt b/example/android/app/src/gms/kotlin/com/exponea/example/services/MyGmsMessageService.kt new file mode 100644 index 0000000..658f09d --- /dev/null +++ b/example/android/app/src/gms/kotlin/com/exponea/example/services/MyGmsMessageService.kt @@ -0,0 +1,24 @@ +package com.exponea.example.services + +import android.app.NotificationManager +import android.content.Context +import com.exponea.ExponeaPlugin +import com.google.firebase.messaging.FirebaseMessagingService +import com.google.firebase.messaging.RemoteMessage + +class MyGmsMessageService : FirebaseMessagingService() { + + private val notificationManager by lazy { + getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager + } + + override fun onMessageReceived(message: RemoteMessage) { + super.onMessageReceived(message) + ExponeaPlugin.handleRemoteMessage(applicationContext, message.data, notificationManager) + } + + override fun onNewToken(token: String) { + super.onNewToken(token) + ExponeaPlugin.handleNewGmsToken(applicationContext, token) + } +} diff --git a/example/android/app/src/gms/res/values/strings.xml b/example/android/app/src/gms/res/values/strings.xml new file mode 100644 index 0000000..1d8c166 --- /dev/null +++ b/example/android/app/src/gms/res/values/strings.xml @@ -0,0 +1,3 @@ + + Exponea GMS Example + diff --git a/example/android/app/src/hms/AndroidManifest.xml b/example/android/app/src/hms/AndroidManifest.xml new file mode 100644 index 0000000..e8fa595 --- /dev/null +++ b/example/android/app/src/hms/AndroidManifest.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/example/android/app/src/hms/kotlin/com/exponea/example/services/MyHmsMessageService.kt b/example/android/app/src/hms/kotlin/com/exponea/example/services/MyHmsMessageService.kt new file mode 100644 index 0000000..9b3fa51 --- /dev/null +++ b/example/android/app/src/hms/kotlin/com/exponea/example/services/MyHmsMessageService.kt @@ -0,0 +1,24 @@ +package com.exponea.example.services + +import android.app.NotificationManager +import android.content.Context +import com.exponea.ExponeaPlugin +import com.huawei.hms.push.HmsMessageService +import com.huawei.hms.push.RemoteMessage + +class MyHmsMessageService : HmsMessageService() { + + private val notificationManager by lazy { + getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager + } + + override fun onMessageReceived(message: RemoteMessage) { + super.onMessageReceived(message) + ExponeaPlugin.handleRemoteMessage(applicationContext, message.dataOfMap, notificationManager) + } + + override fun onNewToken(token: String) { + super.onNewToken(token) + ExponeaPlugin.handleNewHmsToken(applicationContext, token) + } +} diff --git a/example/android/app/src/hms/res/values/strings.xml b/example/android/app/src/hms/res/values/strings.xml new file mode 100644 index 0000000..6ad2182 --- /dev/null +++ b/example/android/app/src/hms/res/values/strings.xml @@ -0,0 +1,3 @@ + + Exponea HMS Example + diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 6ea6c02..41352e3 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -3,9 +3,10 @@ + android:label="@string/app_name"> - - diff --git a/example/android/app/src/main/kotlin/com/exponea/example/MainActivity.kt b/example/android/app/src/main/kotlin/com/exponea/example/MainActivity.kt index 36d2bd6..d9a0e5a 100644 --- a/example/android/app/src/main/kotlin/com/exponea/example/MainActivity.kt +++ b/example/android/app/src/main/kotlin/com/exponea/example/MainActivity.kt @@ -7,12 +7,12 @@ import io.flutter.embedding.android.FlutterActivity class MainActivity : FlutterActivity() { override fun onCreate(savedInstanceState: Bundle?) { - ExponeaPlugin.Companion.handleCampaignIntent(intent, applicationContext) + ExponeaPlugin.handleCampaignIntent(intent, applicationContext) super.onCreate(savedInstanceState) } override fun onNewIntent(intent: Intent) { - ExponeaPlugin.Companion.handleCampaignIntent(intent, applicationContext) + ExponeaPlugin.handleCampaignIntent(intent, applicationContext) super.onNewIntent(intent) } } diff --git a/example/android/app/src/main/res/values/strings.xml b/example/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..75fc2fc --- /dev/null +++ b/example/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + Default Example + diff --git a/android/src/test/kotlin/com/exponea/data/BaseTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/BaseTest.kt similarity index 83% rename from android/src/test/kotlin/com/exponea/data/BaseTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/BaseTest.kt index 403d9c9..d53472a 100644 --- a/android/src/test/kotlin/com/exponea/data/BaseTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/BaseTest.kt @@ -1,4 +1,4 @@ -package com.exponea.data +package com.exponea.example import com.google.gson.Gson import com.google.gson.reflect.TypeToken @@ -7,14 +7,14 @@ import java.io.File abstract class BaseTest { companion object { fun readMapData(fileName: String): List> { - val file = File("../test/values/$fileName.json") + val file = File("../../../test/values/$fileName.json") val fileData = file.readText(Charsets.UTF_8) val expectedType = object : TypeToken>?>() {}.getType() return Gson().fromJson(fileData, expectedType) as List> } fun readStringData(fileName: String): List { - val file = File("../test/values/$fileName.json") + val file = File("../../../test/values/$fileName.json") val fileData = file.readText(Charsets.UTF_8) val expectedType = object : TypeToken?>() {}.getType() return Gson().fromJson(fileData, expectedType) as List diff --git a/android/src/test/kotlin/com/exponea/data/ConfigurationChangeTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/ConfigurationChangeTest.kt similarity index 97% rename from android/src/test/kotlin/com/exponea/data/ConfigurationChangeTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/ConfigurationChangeTest.kt index 5b0acf2..417b04c 100644 --- a/android/src/test/kotlin/com/exponea/data/ConfigurationChangeTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/ConfigurationChangeTest.kt @@ -1,5 +1,6 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.ExponeaConfigurationParser import com.exponea.sdk.models.EventType import com.exponea.sdk.models.ExponeaConfiguration import org.junit.Assert.assertEquals diff --git a/android/src/test/kotlin/com/exponea/data/ConfigurationTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/ConfigurationTest.kt similarity index 97% rename from android/src/test/kotlin/com/exponea/data/ConfigurationTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/ConfigurationTest.kt index 5aa7d0b..ca2e2f6 100644 --- a/android/src/test/kotlin/com/exponea/data/ConfigurationTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/ConfigurationTest.kt @@ -1,5 +1,6 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.ExponeaConfigurationParser import com.exponea.sdk.models.EventType import com.exponea.sdk.models.ExponeaConfiguration import com.exponea.sdk.models.ExponeaConfiguration.TokenFrequency diff --git a/android/src/test/kotlin/com/exponea/data/ConsentTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/ConsentTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/ConsentTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/ConsentTest.kt index 86fe4c8..dee0aa0 100644 --- a/android/src/test/kotlin/com/exponea/data/ConsentTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/ConsentTest.kt @@ -1,5 +1,6 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.ConsentEncoder import com.exponea.sdk.models.Consent import com.exponea.sdk.models.ConsentSources import org.junit.Assert.assertEquals diff --git a/android/src/test/kotlin/com/exponea/data/CustomerTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/CustomerTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/CustomerTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/CustomerTest.kt index 7ef2b80..f8050f3 100644 --- a/android/src/test/kotlin/com/exponea/data/CustomerTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/CustomerTest.kt @@ -1,5 +1,6 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.Customer import org.junit.Assert.assertEquals import org.junit.Assert.fail import org.junit.BeforeClass diff --git a/android/src/test/kotlin/com/exponea/data/EventTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/EventTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/EventTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/EventTest.kt index 40a0d03..2dc0278 100644 --- a/android/src/test/kotlin/com/exponea/data/EventTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/EventTest.kt @@ -1,5 +1,6 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.Event import org.junit.Assert.assertEquals import org.junit.Assert.fail import org.junit.BeforeClass diff --git a/android/src/test/kotlin/com/exponea/data/EventTypeTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/EventTypeTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/EventTypeTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/EventTypeTest.kt index 39cdb5b..4edf487 100644 --- a/android/src/test/kotlin/com/exponea/data/EventTypeTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/EventTypeTest.kt @@ -1,4 +1,4 @@ -package com.exponea.data +package com.exponea.example import com.exponea.sdk.models.EventType import org.junit.Assert.assertEquals diff --git a/android/src/test/kotlin/com/exponea/data/FlushModeTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/FlushModeTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/FlushModeTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/FlushModeTest.kt index 4ba789b..61e2576 100644 --- a/android/src/test/kotlin/com/exponea/data/FlushModeTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/FlushModeTest.kt @@ -1,4 +1,4 @@ -package com.exponea.data +package com.exponea.example import com.exponea.sdk.models.FlushMode import org.junit.Assert.assertEquals diff --git a/android/src/test/kotlin/com/exponea/data/HttpLogLevelTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/HttpLogLevelTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/HttpLogLevelTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/HttpLogLevelTest.kt index d9b0600..0c0439a 100644 --- a/android/src/test/kotlin/com/exponea/data/HttpLogLevelTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/HttpLogLevelTest.kt @@ -1,4 +1,4 @@ -package com.exponea.data +package com.exponea.example import com.exponea.sdk.models.ExponeaConfiguration.HttpLoggingLevel import org.junit.Assert.assertEquals diff --git a/android/src/test/kotlin/com/exponea/data/LogLevelTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/LogLevelTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/LogLevelTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/LogLevelTest.kt index 8bbeeef..b5b5e8a 100644 --- a/android/src/test/kotlin/com/exponea/data/LogLevelTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/LogLevelTest.kt @@ -1,4 +1,4 @@ -package com.exponea.data +package com.exponea.example import com.exponea.sdk.util.Logger.Level import org.junit.Assert.assertEquals diff --git a/android/src/test/kotlin/com/exponea/data/OpenedPushTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/OpenedPushTest.kt similarity index 91% rename from android/src/test/kotlin/com/exponea/data/OpenedPushTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/OpenedPushTest.kt index c7078f4..46697e0 100644 --- a/android/src/test/kotlin/com/exponea/data/OpenedPushTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/OpenedPushTest.kt @@ -1,5 +1,7 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.OpenedPush +import com.exponea.data.PushAction import org.junit.Assert.assertEquals import org.junit.Assert.fail import org.junit.BeforeClass diff --git a/android/src/test/kotlin/com/exponea/data/ProjectTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/ProjectTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/ProjectTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/ProjectTest.kt index 9954251..513a066 100644 --- a/android/src/test/kotlin/com/exponea/data/ProjectTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/ProjectTest.kt @@ -1,5 +1,6 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.ExponeaConfigurationParser import org.junit.Assert.assertEquals import org.junit.Assert.fail import org.junit.BeforeClass diff --git a/android/src/test/kotlin/com/exponea/data/ReceivedPushTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/ReceivedPushTest.kt similarity index 92% rename from android/src/test/kotlin/com/exponea/data/ReceivedPushTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/ReceivedPushTest.kt index da08c67..e58cb04 100644 --- a/android/src/test/kotlin/com/exponea/data/ReceivedPushTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/ReceivedPushTest.kt @@ -1,5 +1,6 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.ReceivedPush import org.junit.Assert.assertEquals import org.junit.Assert.fail import org.junit.BeforeClass diff --git a/android/src/test/kotlin/com/exponea/data/RecommendationOptionsTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/RecommendationOptionsTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/RecommendationOptionsTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/RecommendationOptionsTest.kt index 782013a..67a7033 100644 --- a/android/src/test/kotlin/com/exponea/data/RecommendationOptionsTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/RecommendationOptionsTest.kt @@ -1,5 +1,6 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.RecommendationOptionsEncoder import com.exponea.sdk.models.CustomerRecommendationOptions import com.google.gson.JsonPrimitive import org.junit.Assert.assertEquals diff --git a/android/src/test/kotlin/com/exponea/data/RecommendationTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/RecommendationTest.kt similarity index 95% rename from android/src/test/kotlin/com/exponea/data/RecommendationTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/RecommendationTest.kt index c440bfa..18b5bbe 100644 --- a/android/src/test/kotlin/com/exponea/data/RecommendationTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/RecommendationTest.kt @@ -1,5 +1,6 @@ -package com.exponea.data +package com.exponea.example +import com.exponea.data.RecommendationEncoder import com.exponea.sdk.models.CustomerRecommendation import com.google.gson.JsonPrimitive import org.junit.Assert.assertEquals diff --git a/android/src/test/kotlin/com/exponea/data/TokenFrequencyTest.kt b/example/android/app/src/test/kotlin/com/exponea/example/TokenFrequencyTest.kt similarity index 96% rename from android/src/test/kotlin/com/exponea/data/TokenFrequencyTest.kt rename to example/android/app/src/test/kotlin/com/exponea/example/TokenFrequencyTest.kt index 505b987..b7295ea 100644 --- a/android/src/test/kotlin/com/exponea/data/TokenFrequencyTest.kt +++ b/example/android/app/src/test/kotlin/com/exponea/example/TokenFrequencyTest.kt @@ -1,4 +1,4 @@ -package com.exponea.data +package com.exponea.example import com.exponea.sdk.models.ExponeaConfiguration.TokenFrequency import org.junit.Assert.assertEquals diff --git a/example/android/build.gradle b/example/android/build.gradle index db39fb5..5bee629 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,30 +1,36 @@ buildscript { ext { minSdkVersion = 21 - compileSdkVersion = 30 - targetSdkVersion = 30 + compileSdkVersion = 31 + targetSdkVersion = 31 androidGradlePluginVersion = '4.1.0' - kotlinVersion = '1.3.50' - multidexVersion = '1.0.3' - googleServicesVersion = '4.3.3' + kotlinVersion = '1.5.30' + multidexVersion = '2.0.1' + firebaseVersion = '23.0.0' + agconnectVersion = '1.5.2.300' + hmsVersion = '5.3.0.304' + googleServicesVersion = '4.3.10' } repositories { google() - jcenter() + mavenCentral() + maven { url 'https://developer.huawei.com/repo/' } } dependencies { classpath "com.android.tools.build:gradle:$androidGradlePluginVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "com.google.gms:google-services:$googleServicesVersion" + classpath "com.huawei.agconnect:agcp:$agconnectVersion" } } allprojects { repositories { google() - jcenter() + mavenCentral() + maven { url 'https://developer.huawei.com/repo/' } } } diff --git a/example/android/gradlew.bat b/example/android/gradlew.bat index e95643d..f955316 100644 --- a/example/android/gradlew.bat +++ b/example/android/gradlew.bat @@ -1,84 +1,84 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 9367d48..8d4492f 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 9.0 diff --git a/example/ios/Podfile b/example/ios/Podfile index fbf8f6a..f15f169 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -41,7 +41,7 @@ target 'ExponeaTests' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) pod 'Quick', '4.0.0' - pod 'Nimble', '8.0.7' + pod 'Nimble', '9.2.1' end target 'ExampleNotificationService' do diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 688d3d7..38a6cfd 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,15 +1,15 @@ PODS: - - AnyCodable-FlightSchool (0.4.1) + - AnyCodable-FlightSchool (0.6.3) - exponea (0.0.1): - - AnyCodable-FlightSchool (~> 0.4.0) - - ExponeaSDK (~> 2.11.1) + - AnyCodable-FlightSchool (~> 0.6.3) + - ExponeaSDK (~> 2.11.3) - Flutter - - ExponeaSDK (2.11.1) + - ExponeaSDK (2.11.3) - ExponeaSDK-Notifications (2.11.1) - Flutter (1.0.0) - - Nimble (8.0.7) + - Nimble (9.2.1) - Quick (4.0.0) - - shared_preferences (0.0.1): + - shared_preferences_ios (0.0.1): - Flutter - uni_links (0.0.1): - Flutter @@ -18,9 +18,9 @@ DEPENDENCIES: - exponea (from `.symlinks/plugins/exponea/ios`) - ExponeaSDK-Notifications - Flutter (from `Flutter`) - - Nimble (= 8.0.7) + - Nimble (= 9.2.1) - Quick (= 4.0.0) - - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) + - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) - uni_links (from `.symlinks/plugins/uni_links/ios`) SPEC REPOS: @@ -36,22 +36,22 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/exponea/ios" Flutter: :path: Flutter - shared_preferences: - :path: ".symlinks/plugins/shared_preferences/ios" + shared_preferences_ios: + :path: ".symlinks/plugins/shared_preferences_ios/ios" uni_links: :path: ".symlinks/plugins/uni_links/ios" SPEC CHECKSUMS: - AnyCodable-FlightSchool: d27283db6e9feaddb0fa73a25835e5cdf41b3213 - exponea: 90027dc1451b5cf79f3a293e770709601d3523ed - ExponeaSDK: 0d94e874bd71c63e730443292a4263a47d6d0b83 + AnyCodable-FlightSchool: 1c9890be5884140c60da5fde1b66380dec4c244a + exponea: bc5a7ee34d24a51530fa679b49488916ddca0277 + ExponeaSDK: 0b5ada84e3d643af657662ec87389af378cd009b ExponeaSDK-Notifications: 6a616340c122ce1fa5dddc76495d375c434948af - Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c - Nimble: a73af6ecd4c9106f434f3d55fc54570be3739e0b + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + Nimble: e7e615c0335ee4bf5b0d786685451e62746117d5 Quick: 6473349e43b9271a8d43839d9ba1c442ed1b7ac4 - shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d + shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad uni_links: d97da20c7701486ba192624d99bffaaffcfc298a -PODFILE CHECKSUM: 7d1d5194d74e70f57aba3a9a46925dbdf19e6d3e +PODFILE CHECKSUM: f747eaa5345ceba3fe7c164df391627cce65a161 -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.3 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index b6a3a2f..4bf3326 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 00108B6BC7139D1EBC994C56 /* Pods_ExampleNotificationService.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EBE65EF2D0FF07718FED6FB6 /* Pods_ExampleNotificationService.framework */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 311DE365268A0D6100A4F699 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 311DE364268A0D6100A4F699 /* UserNotifications.framework */; }; 311DE367268A0D6100A4F699 /* UserNotificationsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 311DE366268A0D6100A4F699 /* UserNotificationsUI.framework */; }; @@ -28,14 +29,13 @@ 31BE44EF268A60900074229D /* ConsentSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BE44EE268A60900074229D /* ConsentSpec.swift */; }; 31C2AE91268B8E4C00C00CC5 /* RecommendationOptionsSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31C2AE90268B8E4C00C00CC5 /* RecommendationOptionsSpec.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 60BCA47BD47923C00018EF7D /* Pods_ExampleNotificationService.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F540248BC1FBB9528F7D01DC /* Pods_ExampleNotificationService.framework */; }; + 52C52464D0CB7A9F053CD349 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E11FE4210C092B9B7E15AFBF /* Pods_Runner.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 7AEC5BB4BEAA848EFC4B908F /* Pods_ExampleNotificationContent.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F32740521564E10E94F78E3 /* Pods_ExampleNotificationContent.framework */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - 9F96BB20841227AD0BB811C9 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26B14DCC4F66E5F6E212001F /* Pods_Runner.framework */; }; - EE395CE1652094720A555342 /* Pods_ExponeaTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C8CA9E84E069545AA57B1D13 /* Pods_ExponeaTests.framework */; }; + A2992ABBEA50B56880EEFB4E /* Pods_ExponeaTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FF1E2BA635663F666F1DA3E7 /* Pods_ExponeaTests.framework */; }; + D09CDB1E202BBA77DF3F8CF0 /* Pods_ExampleNotificationContent.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F593D9C0172FE6B47F7DC0B3 /* Pods_ExampleNotificationContent.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -88,9 +88,10 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0AF20BDF95200B8D5DB25E65 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 0D167464349AE1351891F84E /* Pods-ExponeaTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponeaTests.profile.xcconfig"; path = "Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests.profile.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 26B14DCC4F66E5F6E212001F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 311DE363268A0D6100A4F699 /* ExampleNotificationContent.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ExampleNotificationContent.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 311DE364268A0D6100A4F699 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; }; 311DE366268A0D6100A4F699 /* UserNotificationsUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotificationsUI.framework; path = System/Library/Frameworks/UserNotificationsUI.framework; sourceTree = SDKROOT; }; @@ -117,17 +118,15 @@ 31B4AE50267A2928009655A3 /* ExponeaEventSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExponeaEventSpec.swift; sourceTree = ""; }; 31BE44EE268A60900074229D /* ConsentSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsentSpec.swift; sourceTree = ""; }; 31C2AE90268B8E4C00C00CC5 /* RecommendationOptionsSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecommendationOptionsSpec.swift; sourceTree = ""; }; - 32441AB1A37CBB6ADE1CEB12 /* Pods-ExponeaTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponeaTests.release.xcconfig"; path = "Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests.release.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3F32740521564E10E94F78E3 /* Pods_ExampleNotificationContent.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleNotificationContent.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 40F5D3A04DAF0EC0D2045CED /* Pods-ExponeaTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponeaTests.profile.xcconfig"; path = "Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests.profile.xcconfig"; sourceTree = ""; }; - 632592E36BEE31D411C78AB0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 4085272D588B6AA8FB053B53 /* Pods-ExampleNotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationService.release.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationService/Pods-ExampleNotificationService.release.xcconfig"; sourceTree = ""; }; + 566923C08C0C6794E3377E21 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 5F8A481D7F0DFDB407ACBB26 /* Pods-ExponeaTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponeaTests.debug.xcconfig"; path = "Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests.debug.xcconfig"; sourceTree = ""; }; + 679685BC1926CFA43D27BD10 /* Pods-ExampleNotificationContent.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationContent.release.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationContent/Pods-ExampleNotificationContent.release.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7902A4B46D64290E998C9675 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 76047626E4975688DFE43B55 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 83663C45CB3CABBC6CFD3329 /* Pods-ExampleNotificationContent.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationContent.profile.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationContent/Pods-ExampleNotificationContent.profile.xcconfig"; sourceTree = ""; }; - 8D7D0514CC855C976D00785C /* Pods-ExampleNotificationContent.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationContent.debug.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationContent/Pods-ExampleNotificationContent.debug.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -135,14 +134,15 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9E5B79EB919543D20C44CBF1 /* Pods-ExampleNotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationService.release.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationService/Pods-ExampleNotificationService.release.xcconfig"; sourceTree = ""; }; - A1B1A50085D602BF3528DDB3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - AED2F1377F0DE28127B92658 /* Pods-ExponeaTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponeaTests.debug.xcconfig"; path = "Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests.debug.xcconfig"; sourceTree = ""; }; - BF4A2BC2D8BDF144B7D045C0 /* Pods-ExampleNotificationContent.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationContent.release.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationContent/Pods-ExampleNotificationContent.release.xcconfig"; sourceTree = ""; }; - C8CA9E84E069545AA57B1D13 /* Pods_ExponeaTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExponeaTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E5F4B5CCA26FD20C1F3CFED3 /* Pods-ExampleNotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationService.debug.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationService/Pods-ExampleNotificationService.debug.xcconfig"; sourceTree = ""; }; - F540248BC1FBB9528F7D01DC /* Pods_ExampleNotificationService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleNotificationService.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - FBD08C902E6CEFF06DE4BDCF /* Pods-ExampleNotificationService.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationService.profile.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationService/Pods-ExampleNotificationService.profile.xcconfig"; sourceTree = ""; }; + B97AA8FC505599FC2303EA24 /* Pods-ExampleNotificationService.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationService.profile.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationService/Pods-ExampleNotificationService.profile.xcconfig"; sourceTree = ""; }; + CA0FD0068A4DE63B3A49D942 /* Pods-ExampleNotificationContent.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationContent.debug.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationContent/Pods-ExampleNotificationContent.debug.xcconfig"; sourceTree = ""; }; + CE33F62D8D51FEE126A0B35F /* Pods-ExponeaTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponeaTests.release.xcconfig"; path = "Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests.release.xcconfig"; sourceTree = ""; }; + DDB77A9B63938F2B87CF7D45 /* Pods-ExampleNotificationContent.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationContent.profile.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationContent/Pods-ExampleNotificationContent.profile.xcconfig"; sourceTree = ""; }; + E11FE4210C092B9B7E15AFBF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EBE65EF2D0FF07718FED6FB6 /* Pods_ExampleNotificationService.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleNotificationService.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EF7A5C7843127B1F348C4462 /* Pods-ExampleNotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleNotificationService.debug.xcconfig"; path = "Target Support Files/Pods-ExampleNotificationService/Pods-ExampleNotificationService.debug.xcconfig"; sourceTree = ""; }; + F593D9C0172FE6B47F7DC0B3 /* Pods_ExampleNotificationContent.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleNotificationContent.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + FF1E2BA635663F666F1DA3E7 /* Pods_ExponeaTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExponeaTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -152,7 +152,7 @@ files = ( 311DE367268A0D6100A4F699 /* UserNotificationsUI.framework in Frameworks */, 311DE365268A0D6100A4F699 /* UserNotifications.framework in Frameworks */, - 7AEC5BB4BEAA848EFC4B908F /* Pods_ExampleNotificationContent.framework in Frameworks */, + D09CDB1E202BBA77DF3F8CF0 /* Pods_ExampleNotificationContent.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -160,7 +160,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 60BCA47BD47923C00018EF7D /* Pods_ExampleNotificationService.framework in Frameworks */, + 00108B6BC7139D1EBC994C56 /* Pods_ExampleNotificationService.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -168,7 +168,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - EE395CE1652094720A555342 /* Pods_ExponeaTests.framework in Frameworks */, + A2992ABBEA50B56880EEFB4E /* Pods_ExponeaTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -176,7 +176,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9F96BB20841227AD0BB811C9 /* Pods_Runner.framework in Frameworks */, + 52C52464D0CB7A9F053CD349 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -186,12 +186,12 @@ 03DF6560E4CA95B79C6AE5F2 /* Frameworks */ = { isa = PBXGroup; children = ( - 26B14DCC4F66E5F6E212001F /* Pods_Runner.framework */, - C8CA9E84E069545AA57B1D13 /* Pods_ExponeaTests.framework */, 311DE364268A0D6100A4F699 /* UserNotifications.framework */, 311DE366268A0D6100A4F699 /* UserNotificationsUI.framework */, - 3F32740521564E10E94F78E3 /* Pods_ExampleNotificationContent.framework */, - F540248BC1FBB9528F7D01DC /* Pods_ExampleNotificationService.framework */, + F593D9C0172FE6B47F7DC0B3 /* Pods_ExampleNotificationContent.framework */, + EBE65EF2D0FF07718FED6FB6 /* Pods_ExampleNotificationService.framework */, + FF1E2BA635663F666F1DA3E7 /* Pods_ExponeaTests.framework */, + E11FE4210C092B9B7E15AFBF /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -240,18 +240,18 @@ 62A7C46CA5BC78B76629EA82 /* Pods */ = { isa = PBXGroup; children = ( - 7902A4B46D64290E998C9675 /* Pods-Runner.debug.xcconfig */, - A1B1A50085D602BF3528DDB3 /* Pods-Runner.release.xcconfig */, - 632592E36BEE31D411C78AB0 /* Pods-Runner.profile.xcconfig */, - AED2F1377F0DE28127B92658 /* Pods-ExponeaTests.debug.xcconfig */, - 32441AB1A37CBB6ADE1CEB12 /* Pods-ExponeaTests.release.xcconfig */, - 40F5D3A04DAF0EC0D2045CED /* Pods-ExponeaTests.profile.xcconfig */, - 8D7D0514CC855C976D00785C /* Pods-ExampleNotificationContent.debug.xcconfig */, - BF4A2BC2D8BDF144B7D045C0 /* Pods-ExampleNotificationContent.release.xcconfig */, - 83663C45CB3CABBC6CFD3329 /* Pods-ExampleNotificationContent.profile.xcconfig */, - E5F4B5CCA26FD20C1F3CFED3 /* Pods-ExampleNotificationService.debug.xcconfig */, - 9E5B79EB919543D20C44CBF1 /* Pods-ExampleNotificationService.release.xcconfig */, - FBD08C902E6CEFF06DE4BDCF /* Pods-ExampleNotificationService.profile.xcconfig */, + CA0FD0068A4DE63B3A49D942 /* Pods-ExampleNotificationContent.debug.xcconfig */, + 679685BC1926CFA43D27BD10 /* Pods-ExampleNotificationContent.release.xcconfig */, + DDB77A9B63938F2B87CF7D45 /* Pods-ExampleNotificationContent.profile.xcconfig */, + EF7A5C7843127B1F348C4462 /* Pods-ExampleNotificationService.debug.xcconfig */, + 4085272D588B6AA8FB053B53 /* Pods-ExampleNotificationService.release.xcconfig */, + B97AA8FC505599FC2303EA24 /* Pods-ExampleNotificationService.profile.xcconfig */, + 5F8A481D7F0DFDB407ACBB26 /* Pods-ExponeaTests.debug.xcconfig */, + CE33F62D8D51FEE126A0B35F /* Pods-ExponeaTests.release.xcconfig */, + 0D167464349AE1351891F84E /* Pods-ExponeaTests.profile.xcconfig */, + 566923C08C0C6794E3377E21 /* Pods-Runner.debug.xcconfig */, + 0AF20BDF95200B8D5DB25E65 /* Pods-Runner.release.xcconfig */, + 76047626E4975688DFE43B55 /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -315,7 +315,7 @@ isa = PBXNativeTarget; buildConfigurationList = 311DE376268A0D6100A4F699 /* Build configuration list for PBXNativeTarget "ExampleNotificationContent" */; buildPhases = ( - F60778C02215790B061053B3 /* [CP] Check Pods Manifest.lock */, + E37B26410D57D2A8425096EE /* [CP] Check Pods Manifest.lock */, 311DE35F268A0D6100A4F699 /* Sources */, 311DE360268A0D6100A4F699 /* Frameworks */, 311DE361268A0D6100A4F699 /* Resources */, @@ -333,7 +333,7 @@ isa = PBXNativeTarget; buildConfigurationList = 311DE383268A0D9400A4F699 /* Build configuration list for PBXNativeTarget "ExampleNotificationService" */; buildPhases = ( - CD15C56AB7D8A0032F69EDED /* [CP] Check Pods Manifest.lock */, + DC864A457C7C1F06A2BF8320 /* [CP] Check Pods Manifest.lock */, 311DE377268A0D9400A4F699 /* Sources */, 311DE378268A0D9400A4F699 /* Frameworks */, 311DE379268A0D9400A4F699 /* Resources */, @@ -351,11 +351,11 @@ isa = PBXNativeTarget; buildConfigurationList = 31B4ADEA2679F1BE009655A3 /* Build configuration list for PBXNativeTarget "ExponeaTests" */; buildPhases = ( - 479CCFF8AAABF0FB0C0841B8 /* [CP] Check Pods Manifest.lock */, + 5CB845FCC9974678FA8BD7E7 /* [CP] Check Pods Manifest.lock */, 31B4ADDC2679F1BE009655A3 /* Sources */, 31B4ADDD2679F1BE009655A3 /* Frameworks */, 31B4ADDE2679F1BE009655A3 /* Resources */, - 67E2ED78A2730A7C0786C58C /* [CP] Embed Pods Frameworks */, + 0E04923ECCEDD6F614825813 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -371,15 +371,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 080E57072518360E2B9F20FC /* [CP] Check Pods Manifest.lock */, + DE86A9BCBED274AC037D008A /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 9D0EF0C69D180E75CF58B36C /* [CP] Embed Pods Frameworks */, 311DE372268A0D6100A4F699 /* Embed App Extensions */, + A301FBA9F032B30FC651FA97 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -399,7 +399,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1250; - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1300; ORGANIZATIONNAME = ""; TargetAttributes = { 311DE362268A0D6100A4F699 = { @@ -475,26 +475,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 080E57072518360E2B9F20FC /* [CP] Check Pods Manifest.lock */ = { + 0E04923ECCEDD6F614825813 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { @@ -511,7 +506,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 479CCFF8AAABF0FB0C0841B8 /* [CP] Check Pods Manifest.lock */ = { + 5CB845FCC9974678FA8BD7E7 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -533,23 +528,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 67E2ED78A2730A7C0786C58C /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ExponeaTests/Pods-ExponeaTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -564,7 +542,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - 9D0EF0C69D180E75CF58B36C /* [CP] Embed Pods Frameworks */ = { + A301FBA9F032B30FC651FA97 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -581,7 +559,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - CD15C56AB7D8A0032F69EDED /* [CP] Check Pods Manifest.lock */ = { + DC864A457C7C1F06A2BF8320 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -603,7 +581,29 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - F60778C02215790B061053B3 /* [CP] Check Pods Manifest.lock */ = { + DE86A9BCBED274AC037D008A /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + E37B26410D57D2A8425096EE /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -805,7 +805,7 @@ }; 311DE373268A0D6100A4F699 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8D7D0514CC855C976D00785C /* Pods-ExampleNotificationContent.debug.xcconfig */; + baseConfigurationReference = CA0FD0068A4DE63B3A49D942 /* Pods-ExampleNotificationContent.debug.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -839,7 +839,7 @@ }; 311DE374268A0D6100A4F699 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BF4A2BC2D8BDF144B7D045C0 /* Pods-ExampleNotificationContent.release.xcconfig */; + baseConfigurationReference = 679685BC1926CFA43D27BD10 /* Pods-ExampleNotificationContent.release.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -870,7 +870,7 @@ }; 311DE375268A0D6100A4F699 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 83663C45CB3CABBC6CFD3329 /* Pods-ExampleNotificationContent.profile.xcconfig */; + baseConfigurationReference = DDB77A9B63938F2B87CF7D45 /* Pods-ExampleNotificationContent.profile.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -901,7 +901,7 @@ }; 311DE384268A0D9400A4F699 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E5F4B5CCA26FD20C1F3CFED3 /* Pods-ExampleNotificationService.debug.xcconfig */; + baseConfigurationReference = EF7A5C7843127B1F348C4462 /* Pods-ExampleNotificationService.debug.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -935,7 +935,7 @@ }; 311DE385268A0D9400A4F699 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9E5B79EB919543D20C44CBF1 /* Pods-ExampleNotificationService.release.xcconfig */; + baseConfigurationReference = 4085272D588B6AA8FB053B53 /* Pods-ExampleNotificationService.release.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -966,7 +966,7 @@ }; 311DE386268A0D9400A4F699 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FBD08C902E6CEFF06DE4BDCF /* Pods-ExampleNotificationService.profile.xcconfig */; + baseConfigurationReference = B97AA8FC505599FC2303EA24 /* Pods-ExampleNotificationService.profile.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -997,7 +997,7 @@ }; 31B4ADE72679F1BE009655A3 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AED2F1377F0DE28127B92658 /* Pods-ExponeaTests.debug.xcconfig */; + baseConfigurationReference = 5F8A481D7F0DFDB407ACBB26 /* Pods-ExponeaTests.debug.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -1028,7 +1028,7 @@ }; 31B4ADE82679F1BE009655A3 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 32441AB1A37CBB6ADE1CEB12 /* Pods-ExponeaTests.release.xcconfig */; + baseConfigurationReference = CE33F62D8D51FEE126A0B35F /* Pods-ExponeaTests.release.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -1056,7 +1056,7 @@ }; 31B4ADE92679F1BE009655A3 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 40F5D3A04DAF0EC0D2045CED /* Pods-ExponeaTests.profile.xcconfig */; + baseConfigurationReference = 0D167464349AE1351891F84E /* Pods-ExponeaTests.profile.xcconfig */; buildSettings = { CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index d7811e8..49e3119 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ _MyAppState(); } @@ -33,6 +35,7 @@ class _MyAppState extends State { _showSnackBarMessage('App opened with link: $initialLink'); } } on PlatformException catch (err) { + // ignore: avoid_print print('initialLink: $err'); } } @@ -61,7 +64,7 @@ class _MyAppState extends State { return MaterialApp( scaffoldMessengerKey: _scaffoldMessengerKey, theme: ThemeData.from( - colorScheme: ColorScheme.light( + colorScheme: const ColorScheme.light( primary: Colors.amber, secondary: Colors.blueAccent, ), diff --git a/example/lib/page/config.dart b/example/lib/page/config.dart index d9db6b2..56f9b39 100644 --- a/example/lib/page/config.dart +++ b/example/lib/page/config.dart @@ -20,10 +20,10 @@ class ConfigPage extends StatefulWidget { } class _ConfigPageState extends State { - static const SP_KEY_PROJECT = 'project_token'; - static const SP_KEY_AUTH = 'auth_token'; - static const SP_KEY_BASE_URL = 'base_url'; - static const SP_KEY_SESSION_TRACKING = 'session_tracking'; + static const _spKeyProject = 'project_token'; + static const _spKeyAuth = 'auth_token'; + static const _spKeyBaseUrl = 'base_url'; + static const _spKeySessionTracking = 'session_tracking'; final _loading = ValueNotifier(false); late final TextEditingController _projectTokenController; @@ -38,11 +38,11 @@ class _ConfigPageState extends State { _baseUrlController = TextEditingController(text: ''); _sessionTrackingController = ValueNotifier(true); SharedPreferences.getInstance().then((sp) async { - _projectTokenController.text = sp.getString(SP_KEY_PROJECT) ?? ''; - _authTokenController.text = sp.getString(SP_KEY_AUTH) ?? ''; - _baseUrlController.text = sp.getString(SP_KEY_BASE_URL) ?? ''; + _projectTokenController.text = sp.getString(_spKeyProject) ?? ''; + _authTokenController.text = sp.getString(_spKeyAuth) ?? ''; + _baseUrlController.text = sp.getString(_spKeyBaseUrl) ?? ''; _sessionTrackingController.value = - sp.getBool(SP_KEY_SESSION_TRACKING) ?? true; + sp.getBool(_spKeySessionTracking) ?? true; }); super.initState(); } @@ -51,49 +51,51 @@ class _ConfigPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('Exponea Demo Configuration'), + title: const Text('Exponea Demo Configuration'), ), body: SafeArea( child: Center( child: ConstrainedBox( - constraints: BoxConstraints(maxWidth: 400), + constraints: const BoxConstraints(maxWidth: 400), child: Column( children: [ ListTile( title: TextField( controller: _projectTokenController, - decoration: InputDecoration(labelText: 'Project Token'), + decoration: const InputDecoration( + labelText: 'Project Token', + ), ), ), ListTile( title: TextField( controller: _authTokenController, - decoration: InputDecoration(labelText: 'Auth Token'), + decoration: const InputDecoration(labelText: 'Auth Token'), ), ), ListTile( title: TextField( controller: _baseUrlController, - decoration: InputDecoration(labelText: 'Base URL'), + decoration: const InputDecoration(labelText: 'Base URL'), ), ), ValueListenableBuilder( valueListenable: _sessionTrackingController, builder: (context, enabled, _) => SwitchListTile( - title: Text('Automatic Session Tracking'), + title: const Text('Automatic Session Tracking'), value: enabled, onChanged: (value) => _sessionTrackingController.value = value, ), ), - Spacer(), + const Spacer(), ValueListenableBuilder( valueListenable: _loading, builder: (context, loading, _) => loading - ? CircularProgressIndicator() + ? const CircularProgressIndicator() : ElevatedButton( onPressed: () => _configure(context), - child: Text('Configure'), + child: const Text('Configure'), ), ), ], @@ -113,10 +115,10 @@ class _ConfigPageState extends State { final sessionTracking = _sessionTrackingController.value; final sp = await SharedPreferences.getInstance(); - await sp.setString(SP_KEY_PROJECT, projectToken); - await sp.setString(SP_KEY_AUTH, authToken); - await sp.setString(SP_KEY_BASE_URL, rawBaseUrl); - await sp.setBool(SP_KEY_SESSION_TRACKING, sessionTracking); + await sp.setString(_spKeyProject, projectToken); + await sp.setString(_spKeyAuth, authToken); + await sp.setString(_spKeyBaseUrl, rawBaseUrl); + await sp.setBool(_spKeySessionTracking, sessionTracking); final config = ExponeaConfiguration( projectToken: projectToken, @@ -126,7 +128,7 @@ class _ConfigPageState extends State { flushMaxRetries: 11, automaticSessionTracking: sessionTracking, sessionTimeout: 22.5, - defaultProperties: { + defaultProperties: const { 'string': 'string', 'double': 1.2, 'int': 10, @@ -140,7 +142,7 @@ class _ConfigPageState extends State { // ExponeaProject(projectToken: '2', authorizationToken: '22'), // ], // }, - android: AndroidExponeaConfiguration( + android: const AndroidExponeaConfiguration( automaticPushNotifications: true, httpLoggingLevel: HttpLoggingLevel.body, pushChannelDescription: 'test-channel-desc', @@ -150,7 +152,7 @@ class _ConfigPageState extends State { // pushAccentColor: 10, // pushIcon: 11, ), - ios: IOSExponeaConfiguration( + ios: const IOSExponeaConfiguration( requirePushAuthorization: true, appGroup: 'group.com.exponea.ExponeaSDK-Example2', ), @@ -158,7 +160,7 @@ class _ConfigPageState extends State { try { final configured = await _plugin.configure(config); if (!configured) { - final snackBar = SnackBar( + const snackBar = SnackBar( content: Text('SDK was already configured'), ); ScaffoldMessenger.of(context).showSnackBar(snackBar); diff --git a/example/lib/page/home.dart b/example/lib/page/home.dart index 9778fb2..d5aa53d 100644 --- a/example/lib/page/home.dart +++ b/example/lib/page/home.dart @@ -48,16 +48,16 @@ class _HomePageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('Exponea Demo'), + title: const Text('Exponea Demo'), ), body: SafeArea( child: Center( child: ConstrainedBox( - constraints: BoxConstraints(maxWidth: 400), + constraints: const BoxConstraints(maxWidth: 400), child: ListView( children: [ ListTile( - title: Text('Push events'), + title: const Text('Push events'), subtitle: ValueListenableBuilder( valueListenable: _pushController, builder: (context, value, _) => Text(value), @@ -67,80 +67,80 @@ class _HomePageState extends State { ListTile( title: ElevatedButton( onPressed: () => _requestIosPushAuthorization(context), - child: Text('Request Push Authorization'), + child: const Text('Request Push Authorization'), ), ), ListTile( title: ElevatedButton( onPressed: () => _checkIsConfigured(context), - child: Text('Configured?'), + child: const Text('Configured?'), ), ), ListTile( - title: Text('Customer'), + title: const Text('Customer'), subtitle: Row( children: [ ElevatedButton( onPressed: () => _getCustomerCookie(context), - child: Text('Get Cookie'), + child: const Text('Get Cookie'), ), const SizedBox(width: 8), ElevatedButton( onPressed: () => _identifyCustomer(context), - child: Text('Identify'), + child: const Text('Identify'), ), const SizedBox(width: 8), ElevatedButton( onPressed: () => _anonymize(context), - child: Text('Anonymize'), + child: const Text('Anonymize'), ), ], ), ), ListTile( - title: Text('Default Properties'), + title: const Text('Default Properties'), subtitle: Row( children: [ ElevatedButton( onPressed: () => _getDefaultProps(context), - child: Text('Get'), + child: const Text('Get'), ), const SizedBox(width: 8), ElevatedButton( onPressed: () => _setDefaultProps(context), - child: Text('Set'), + child: const Text('Set'), ), ], ), ), ListTile( - title: Text('Fetch'), + title: const Text('Fetch'), subtitle: Row( children: [ ElevatedButton( onPressed: () => _fetchConsents(context), - child: Text('Consents'), + child: const Text('Consents'), ), const SizedBox(width: 8), ElevatedButton( onPressed: () => _fetchRecommendations(context), - child: Text('Recommendations'), + child: const Text('Recommendations'), ), ], ), ), ListTile( - title: Text('Flush Mode'), + title: const Text('Flush Mode'), subtitle: Row( children: [ ElevatedButton( onPressed: () => _getFlushMode(context), - child: Text('Get'), + child: const Text('Get'), ), const SizedBox(width: 8), ElevatedButton( onPressed: () => _setFlushMode(context), - child: Text('Set'), + child: const Text('Set'), ), const SizedBox(width: 8), Expanded( @@ -168,21 +168,21 @@ class _HomePageState extends State { ListTile( title: ElevatedButton( onPressed: () => _flush(context), - child: Text('Flush'), + child: const Text('Flush'), ), ), ListTile( - title: Text('Flush Period'), + title: const Text('Flush Period'), subtitle: Row( children: [ ElevatedButton( onPressed: () => _getFlushPeriod(context), - child: Text('Get'), + child: const Text('Get'), ), const SizedBox(width: 8), ElevatedButton( onPressed: () => _setFlushPeriod(context), - child: Text('Set'), + child: const Text('Set'), ), const SizedBox(width: 8), Expanded( @@ -211,12 +211,12 @@ class _HomePageState extends State { ), ), ListTile( - title: Text('Track'), + title: const Text('Track'), subtitle: Row( children: [ ElevatedButton( onPressed: () => _trackEvent(context), - child: Text('Event'), + child: const Text('Event'), ), const SizedBox(width: 8), ElevatedButton( @@ -224,7 +224,7 @@ class _HomePageState extends State { (widget.config.automaticSessionTracking ?? true) ? null : () => _trackSessionStart(context), - child: Text('Session Start'), + child: const Text('Session Start'), ), const SizedBox(width: 8), ElevatedButton( @@ -232,51 +232,51 @@ class _HomePageState extends State { (widget.config.automaticSessionTracking ?? true) ? null : () => _trackSessionEnd(context), - child: Text('Session End'), + child: const Text('Session End'), ), ], ), ), ListTile( - title: Text('Trigger in-app message by event:'), + title: const Text('Trigger in-app message by event:'), subtitle: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ ElevatedButton( onPressed: () => _triggerInAppMessage(context, 'test_msg_modal'), - child: Text('Modal'), + child: const Text('Modal'), ), ElevatedButton( onPressed: () => _triggerInAppMessage( context, 'test_msg_fullscreen'), - child: Text('Fullscreen'), + child: const Text('Fullscreen'), ), ElevatedButton( onPressed: () => _triggerInAppMessage(context, 'test_msg_slide'), - child: Text('Slide-in'), + child: const Text('Slide-in'), ), ElevatedButton( onPressed: () => _triggerInAppMessage(context, 'test_msg_alert'), - child: Text('Alert'), + child: const Text('Alert'), ), ], ), ), ListTile( - title: Text('Log Level'), + title: const Text('Log Level'), subtitle: Row( children: [ ElevatedButton( onPressed: () => _getLogLevel(context), - child: Text('Get'), + child: const Text('Get'), ), const SizedBox(width: 8), ElevatedButton( onPressed: () => _setLogLevel(context), - child: Text('Set'), + child: const Text('Set'), ), const SizedBox(width: 8), Expanded( @@ -324,9 +324,8 @@ class _HomePageState extends State { Future _identifyCustomer(BuildContext context) => _runAndShowResult(context, () async { - // final email = 'user.${Random().nextInt(10000)}@test.com'; - final email = 'user.125@test.com'; - final customer = Customer( + const email = 'test-user-1@test.com'; + const customer = Customer( ids: { 'registered': email, }, @@ -401,7 +400,7 @@ class _HomePageState extends State { Future _trackEvent(BuildContext context) => _runAndShowResult(context, () async { - final event = Event( + const event = Event( name: 'test_name', properties: { 'bool': true, @@ -446,7 +445,7 @@ class _HomePageState extends State { Future _runAndShowResult( BuildContext context, - Future block(), + Future Function() block, ) async { String msg; try { @@ -461,7 +460,7 @@ class _HomePageState extends State { } final snackBar = SnackBar( content: Text(msg), - duration: Duration(seconds: 1), + duration: const Duration(seconds: 1), ); ScaffoldMessenger.of(context).showSnackBar(snackBar); } diff --git a/example/lib/page/link.dart b/example/lib/page/link.dart index 66cf5d6..7ad12f9 100644 --- a/example/lib/page/link.dart +++ b/example/lib/page/link.dart @@ -12,13 +12,13 @@ class LinkPage extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('Link'), + title: const Text('Link'), ), body: Center( child: Text(link), ), floatingActionButton: FloatingActionButton( - child: Icon(Icons.done), + child: const Icon(Icons.done), onPressed: () => Navigator.of(context).pop(), ), ); diff --git a/example/pubspec.lock b/example/pubspec.lock index 27e3b9a..30311f5 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,41 +1,13 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.6.1" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted version: "1.2.0" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" collection: dependency: transitive description: @@ -43,27 +15,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.15.0" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" exponea: dependency: "direct main" description: path: ".." relative: true source: path - version: "0.2.0" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "1.0.0" ffi: dependency: transitive description: @@ -83,11 +41,13 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_test: + flutter_lints: dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" flutter_web_plugins: dependency: transitive description: flutter @@ -100,20 +60,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.3" - matcher: + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + material_color_utilities: dependency: transitive description: - name: matcher + name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.1.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -148,14 +115,14 @@ packages: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.2" process: dependency: transitive description: @@ -169,14 +136,28 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.13" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + shared_preferences_ios: + dependency: transitive + description: + name: shared_preferences_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" shared_preferences_macos: dependency: transitive description: @@ -204,54 +185,12 @@ packages: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" typed_data: dependency: transitive description: @@ -286,7 +225,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" win32: dependency: transitive description: @@ -302,5 +241,5 @@ packages: source: hosted version: "0.2.0" sdks: - dart: ">=2.13.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=2.16.0 <3.0.0" + flutter: ">=2.10.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index c80c486..164ad5f 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -4,7 +4,8 @@ version: 1.0.0+1 publish_to: 'none' environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ^2.16.0 + flutter: ^2.10.0 dependencies: flutter: @@ -13,13 +14,11 @@ dependencies: exponea: path: ../ - shared_preferences: 2.0.6 + shared_preferences: 2.0.13 uni_links: 0.5.1 - cupertino_icons: ^1.0.3 dev_dependencies: - flutter_test: - sdk: flutter + flutter_lints: ^1.0.4 flutter: uses-material-design: true diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart deleted file mode 100644 index 33145de..0000000 --- a/example/test/widget_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:exponea_example/main.dart'; - -void main() { - testWidgets('Verify Platform version', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(MyApp()); - - // Verify that platform version is retrieved. - expect( - find.byWidgetPredicate( - (Widget widget) => widget is Text && - widget.data!.startsWith('Running on:'), - ), - findsOneWidget, - ); - }); -} diff --git a/ios/exponea.podspec b/ios/exponea.podspec index 6431d65..0674e78 100644 --- a/ios/exponea.podspec +++ b/ios/exponea.podspec @@ -15,8 +15,8 @@ A new flutter plugin project. s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.dependency 'ExponeaSDK', '~> 2.11.1' - s.dependency 'AnyCodable-FlightSchool', '~> 0.4.0' + s.dependency 'ExponeaSDK', '~> 2.11.3' + s.dependency 'AnyCodable-FlightSchool', '~> 0.6.3' s.platform = :ios, '10.3' # Flutter.framework does not contain a i386 slice. diff --git a/lib/src/data/util/object.dart b/lib/src/data/util/object.dart index a467106..122497c 100644 --- a/lib/src/data/util/object.dart +++ b/lib/src/data/util/object.dart @@ -1,5 +1,5 @@ extension ObjectExt on T { - R let(R function(T value)) => function.call(this); + R let(R Function(T value) function) => function.call(this); } extension MapExt on Map { diff --git a/lib/src/platform/method_channel.dart b/lib/src/platform/method_channel.dart index fcc32c1..e8f3fc4 100644 --- a/lib/src/platform/method_channel.dart +++ b/lib/src/platform/method_channel.dart @@ -1,6 +1,5 @@ import 'package:flutter/services.dart'; -import '../data/encoder/configuration.dart'; import '../data/encoder/main.dart'; import '../data/model/configuration.dart'; import '../data/model/configuration_change.dart'; @@ -163,23 +162,21 @@ class MethodChannelExponeaPlatform extends ExponeaPlatform { return res; } + @override Stream get openedPushStream { - if (_openedPushStream == null) { - _openedPushStream = _openedPushEventChannel - .receiveBroadcastStream() - .cast>() - .map((event) => OpenedPushEncoder.decode(event)); - } + _openedPushStream ??= _openedPushEventChannel + .receiveBroadcastStream() + .cast>() + .map((event) => OpenedPushEncoder.decode(event)); return _openedPushStream!; } + @override Stream get receivedPushStream { - if (_receivedPushStream == null) { - _receivedPushStream = _receivedPushEventChannel - .receiveBroadcastStream() - .cast>() - .map((event) => ReceivedPushEncoder.decode(event)); - } + _receivedPushStream ??= _receivedPushEventChannel + .receiveBroadcastStream() + .cast>() + .map((event) => ReceivedPushEncoder.decode(event)); return _receivedPushStream!; } diff --git a/pubspec.lock b/pubspec.lock index 9281483..a1c9a5d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -21,14 +21,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -55,6 +55,13 @@ packages: description: flutter source: sdk version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" flutter_test: dependency: "direct dev" description: flutter @@ -72,20 +79,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.6.3" + lints: + dependency: transitive + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: "direct main" description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -99,7 +120,7 @@ packages: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.2" sky_engine: dependency: transitive description: flutter @@ -146,7 +167,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.8" typed_data: dependency: transitive description: @@ -160,7 +181,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" sdks: - dart: ">=2.12.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=2.16.0 <3.0.0" + flutter: ">=2.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index 2fb900e..9c08ffe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,23 +1,24 @@ name: exponea description: >- A full featured wrapper for Exponea SDK that supports Android and iOS. -version: 0.2.1 +version: 1.0.0 homepage: https://exponea.com repository: https://github.com/exponea/exponea-flutter-sdk environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=2.0.0" + sdk: ^2.16.0 + flutter: ^2.10.0 dependencies: flutter: sdk: flutter flutter_web_plugins: sdk: flutter - meta: ^1.3.0 - plugin_platform_interface: ^2.0.0 + meta: ^1.7.0 + plugin_platform_interface: ^2.1.2 dev_dependencies: + flutter_lints: ^1.0.4 flutter_test: sdk: flutter diff --git a/test/unit/data/configuration_change_test.dart b/test/unit/data/configuration_change_test.dart index c14016c..5847704 100644 --- a/test/unit/data/configuration_change_test.dart +++ b/test/unit/data/configuration_change_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('ExponeaConfigurationChange', () { - final encode = ExponeaConfigurationChangeEncoder.encode; - final decode = ExponeaConfigurationChangeEncoder.decode; + const encode = ExponeaConfigurationChangeEncoder.encode; + const decode = ExponeaConfigurationChangeEncoder.decode; final data = readMapData('configuration_change'); test('check data', () async { @@ -20,7 +20,7 @@ void main() { group('encode', () { test('minimal', () async { - final change = ExponeaConfigurationChange( + const change = ExponeaConfigurationChange( project: ExponeaProject( projectToken: 'mock-project-token', authorizationToken: 'mock-auth-token', @@ -31,7 +31,7 @@ void main() { }); test('with base url', () async { - final change = ExponeaConfigurationChange( + const change = ExponeaConfigurationChange( project: ExponeaProject( projectToken: 'mock-project-token', authorizationToken: 'mock-auth-token', @@ -43,7 +43,7 @@ void main() { }); test('full', () async { - final change = ExponeaConfigurationChange( + const change = ExponeaConfigurationChange( project: ExponeaProject( projectToken: 'mock-project-token', authorizationToken: 'mock-auth-token', diff --git a/test/unit/data/configuration_test.dart b/test/unit/data/configuration_test.dart index f9cf10a..d1bbda4 100644 --- a/test/unit/data/configuration_test.dart +++ b/test/unit/data/configuration_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('ExponeaConfiguration', () { - final encode = ExponeaConfigurationEncoder.encode; - final decode = ExponeaConfigurationEncoder.decode; + const encode = ExponeaConfigurationEncoder.encode; + const decode = ExponeaConfigurationEncoder.decode; final data = readMapData('configuration'); test('check data', () async { @@ -19,7 +19,7 @@ void main() { group('encode', () { test('minimal', () async { - final config = ExponeaConfiguration( + const config = ExponeaConfiguration( projectToken: 'mock-project-token', authorizationToken: 'mock-auth-token', ); @@ -27,7 +27,7 @@ void main() { }); test('full', () async { - final config = ExponeaConfiguration( + const config = ExponeaConfiguration( projectToken: 'mock-project-token', authorizationToken: 'mock-auth-token', baseUrl: 'http://mock.base.url.com', diff --git a/test/unit/data/consent_test.dart b/test/unit/data/consent_test.dart index 20f2c09..9fc4060 100644 --- a/test/unit/data/consent_test.dart +++ b/test/unit/data/consent_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('Consent', () { - final encode = ConsentEncoder.encode; - final decode = ConsentEncoder.decode; + const encode = ConsentEncoder.encode; + const decode = ConsentEncoder.decode; final data = readMapData('consent'); test('check data', () async { @@ -80,7 +80,7 @@ void main() { }); test('min', () async { - final expected = Consent( + const expected = Consent( id: 'mock-id', legitimateInterest: true, sources: ConsentSources( @@ -109,7 +109,7 @@ void main() { }); test('full', () async { - final expected = Consent( + const expected = Consent( id: 'mock-id', legitimateInterest: true, sources: ConsentSources( diff --git a/test/unit/data/customer_test.dart b/test/unit/data/customer_test.dart index 42572e2..d726201 100644 --- a/test/unit/data/customer_test.dart +++ b/test/unit/data/customer_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('Customer', () { - final encode = CustomerEncoder.encode; - final decode = CustomerEncoder.decode; + const encode = CustomerEncoder.encode; + const decode = CustomerEncoder.decode; final data = readMapData('customer'); test('check data', () async { @@ -20,12 +20,12 @@ void main() { group('encode', () { test('empty', () async { - final customer = Customer(); + const customer = Customer(); expect(encode(customer), emptyData); }); test('with email', () async { - final customer = Customer( + const customer = Customer( ids: { 'registered': 'test@mail.com', }, @@ -34,7 +34,7 @@ void main() { }); test('full', () async { - final customer = Customer( + const customer = Customer( ids: { 'registered': 'test@mail.com', }, diff --git a/test/unit/data/event_test.dart b/test/unit/data/event_test.dart index 8cbcbfb..ef22cf7 100644 --- a/test/unit/data/event_test.dart +++ b/test/unit/data/event_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('Event', () { - final encode = EventEncoder.encode; - final decode = EventEncoder.decode; + const encode = EventEncoder.encode; + const decode = EventEncoder.decode; final data = readMapData('event'); test('check data', () async { @@ -20,14 +20,14 @@ void main() { group('encode', () { test('empty', () async { - final event = Event(name: 'test_event'); + const event = Event(name: 'test_event'); expect(encode(event), emptyData); }); test('full', () async { final event = Event( name: 'test_event', - properties: { + properties: const { 'str_test': 'abc-123', 'double_test': 123.987, 'int_test': 109, diff --git a/test/unit/data/event_type_test.dart b/test/unit/data/event_type_test.dart index 57246b8..1f58762 100644 --- a/test/unit/data/event_type_test.dart +++ b/test/unit/data/event_type_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('EventType', () { - final encode = EventTypeEncoder.encode; - final decode = EventTypeEncoder.decode; + const encode = EventTypeEncoder.encode; + const decode = EventTypeEncoder.decode; final data = readStringData('event_type'); test('check data', () async { diff --git a/test/unit/data/flush_mode_test.dart b/test/unit/data/flush_mode_test.dart index 5b11614..8906c97 100644 --- a/test/unit/data/flush_mode_test.dart +++ b/test/unit/data/flush_mode_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('FlushMode', () { - final encode = FlushModeEncoder.encode; - final decode = FlushModeEncoder.decode; + const encode = FlushModeEncoder.encode; + const decode = FlushModeEncoder.decode; final data = readStringData('flush_mode'); test('check data', () async { diff --git a/test/unit/data/http_log_level_test.dart b/test/unit/data/http_log_level_test.dart index 2266167..505c831 100644 --- a/test/unit/data/http_log_level_test.dart +++ b/test/unit/data/http_log_level_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('HttpLoggingLevel', () { - final encode = HttpLoggingLevelEncoder.encode; - final decode = HttpLoggingLevelEncoder.decode; + const encode = HttpLoggingLevelEncoder.encode; + const decode = HttpLoggingLevelEncoder.decode; final data = readStringData('http_log_level'); test('check data', () async { diff --git a/test/unit/data/log_level_test.dart b/test/unit/data/log_level_test.dart index 3f79643..cb8c8f0 100644 --- a/test/unit/data/log_level_test.dart +++ b/test/unit/data/log_level_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('LogLevel', () { - final encode = LogLevelEncoder.encode; - final decode = LogLevelEncoder.decode; + const encode = LogLevelEncoder.encode; + const decode = LogLevelEncoder.decode; final data = readStringData('log_level'); test('check data', () async { diff --git a/test/unit/data/notification_importance_test.dart b/test/unit/data/notification_importance_test.dart index 60b4a38..8321ac3 100644 --- a/test/unit/data/notification_importance_test.dart +++ b/test/unit/data/notification_importance_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('PushNotificationImportance', () { - final encode = PushNotificationImportanceEncoder.encode; - final decode = PushNotificationImportanceEncoder.decode; + const encode = PushNotificationImportanceEncoder.encode; + const decode = PushNotificationImportanceEncoder.decode; final data = readStringData('notification_importance'); test('check data', () async { diff --git a/test/unit/data/project_test.dart b/test/unit/data/project_test.dart index 6164112..a6eeba0 100644 --- a/test/unit/data/project_test.dart +++ b/test/unit/data/project_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('ExponeaProject', () { - final encode = ExponeaProjectEncoder.encode; - final decode = ExponeaProjectEncoder.decode; + const encode = ExponeaProjectEncoder.encode; + const decode = ExponeaProjectEncoder.decode; final data = readMapData('project'); test('check data', () async { @@ -21,7 +21,7 @@ void main() { group('encode', () { test('no baseUrl', () async { - final project = ExponeaProject( + const project = ExponeaProject( projectToken: '1234567890', authorizationToken: '0987654321', ); @@ -29,7 +29,7 @@ void main() { }); test('with baseUrl', () async { - final project = ExponeaProject( + const project = ExponeaProject( projectToken: '1234567890', authorizationToken: '0987654321', baseUrl: 'http://a.b.c', @@ -62,7 +62,7 @@ void main() { }); test('no baseUrl', () async { - final expected = ExponeaProject( + const expected = ExponeaProject( projectToken: '1234567890', authorizationToken: '0987654321', ); @@ -74,7 +74,7 @@ void main() { }); test('null baseUrl', () async { - final expected = ExponeaProject( + const expected = ExponeaProject( projectToken: '1234567890', authorizationToken: '0987654321', ); @@ -86,7 +86,7 @@ void main() { }); test('with baseUrl', () async { - final expected = ExponeaProject( + const expected = ExponeaProject( projectToken: '1234567890', authorizationToken: '0987654321', baseUrl: 'http://a.b.c', diff --git a/test/unit/data/push_opened_test.dart b/test/unit/data/push_opened_test.dart index 3e69c37..77da9bc 100644 --- a/test/unit/data/push_opened_test.dart +++ b/test/unit/data/push_opened_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('OpenedPush', () { - final encode = OpenedPushEncoder.encode; - final decode = OpenedPushEncoder.decode; + const encode = OpenedPushEncoder.encode; + const decode = OpenedPushEncoder.decode; final data = readMapData('push_opened'); test('check data', () async { @@ -20,12 +20,12 @@ void main() { group('encode', () { test('app', () async { - final push = OpenedPush(action: PushActionType.app); + const push = OpenedPush(action: PushActionType.app); expect(encode(push), appData); }); test('deeplink', () async { - final push = OpenedPush( + const push = OpenedPush( action: PushActionType.deeplink, data: { 'test': true, @@ -36,7 +36,7 @@ void main() { }); test('web', () async { - final push = OpenedPush( + const push = OpenedPush( action: PushActionType.web, url: 'https://a.b.c', ); @@ -57,7 +57,7 @@ void main() { }); test('app', () async { - final expected = OpenedPush(action: PushActionType.app); + const expected = OpenedPush(action: PushActionType.app); final decoded = decode(appData); expect(decoded.action, expected.action); @@ -66,7 +66,7 @@ void main() { }); test('deeplink', () async { - final expected = OpenedPush( + const expected = OpenedPush( action: PushActionType.deeplink, data: { 'test': true, @@ -81,7 +81,7 @@ void main() { }); test('web', () async { - final expected = OpenedPush( + const expected = OpenedPush( action: PushActionType.web, url: 'https://a.b.c', ); diff --git a/test/unit/data/push_received_test.dart b/test/unit/data/push_received_test.dart index f342042..b2b1cc3 100644 --- a/test/unit/data/push_received_test.dart +++ b/test/unit/data/push_received_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('ReceivedPush', () { - final encode = ReceivedPushEncoder.encode; - final decode = ReceivedPushEncoder.decode; + const encode = ReceivedPushEncoder.encode; + const decode = ReceivedPushEncoder.decode; final data = readMapData('push_received'); test('check data', () async { @@ -25,7 +25,7 @@ void main() { }); test('full data', () async { - final push = ReceivedPush( + const push = ReceivedPush( data: { 'test': true, 'num': 1.23, @@ -66,7 +66,7 @@ void main() { }); test('full data', () async { - final expected = ReceivedPush( + const expected = ReceivedPush( data: { 'test': true, 'num': 1.23, diff --git a/test/unit/data/push_type_test.dart b/test/unit/data/push_type_test.dart index 940de18..16c2b4d 100644 --- a/test/unit/data/push_type_test.dart +++ b/test/unit/data/push_type_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('PushActionType', () { - final encode = PushActionTypeEncoder.encode; - final decode = PushActionTypeEncoder.decode; + const encode = PushActionTypeEncoder.encode; + const decode = PushActionTypeEncoder.decode; final data = readStringData('push_type'); test('check data', () async { diff --git a/test/unit/data/recommendation_test.dart b/test/unit/data/recommendation_test.dart index 309b83b..8517228 100644 --- a/test/unit/data/recommendation_test.dart +++ b/test/unit/data/recommendation_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('Recommendation', () { - final encode = RecommendationEncoder.encode; - final decode = RecommendationEncoder.decode; + const encode = RecommendationEncoder.encode; + const decode = RecommendationEncoder.decode; final data = readMapData('recommendation'); test('check data', () async { @@ -20,7 +20,7 @@ void main() { group('encode', () { test('min', () async { - final recommendation = Recommendation( + const recommendation = Recommendation( engineName: "mock-engine", itemId: "mock-item", recommendationId: "mock-rec-id", @@ -31,7 +31,7 @@ void main() { }); test('full', () async { - final recommendation = Recommendation( + const recommendation = Recommendation( engineName: "mock-engine", itemId: "mock-item", recommendationId: "mock-rec-id", @@ -102,8 +102,8 @@ void main() { }); group('RecommendationOptions', () { - final encode = RecommendationOptionsEncoder.encode; - final decode = RecommendationOptionsEncoder.decode; + const encode = RecommendationOptionsEncoder.encode; + const decode = RecommendationOptionsEncoder.decode; final data = readMapData('recommendation_options'); test('check data', () async { @@ -116,7 +116,7 @@ void main() { group('encode', () { test('min', () async { - final options = RecommendationOptions( + const options = RecommendationOptions( id: 'mock-id', fillWithRandom: true, ); @@ -124,7 +124,7 @@ void main() { }); test('full', () async { - final options = RecommendationOptions( + const options = RecommendationOptions( id: 'mock-id', fillWithRandom: false, size: 5, @@ -160,7 +160,7 @@ void main() { }); test('min', () async { - final expected = RecommendationOptions( + const expected = RecommendationOptions( id: 'mock-id', fillWithRandom: true, ); @@ -176,7 +176,7 @@ void main() { }); test('full', () async { - final expected = RecommendationOptions( + const expected = RecommendationOptions( id: 'mock-id', fillWithRandom: false, size: 5, diff --git a/test/unit/data/token_frequency_test.dart b/test/unit/data/token_frequency_test.dart index 99abb7b..40e1207 100644 --- a/test/unit/data/token_frequency_test.dart +++ b/test/unit/data/token_frequency_test.dart @@ -6,8 +6,8 @@ import 'base.dart'; void main() { group('TokenFrequency', () { - final encode = TokenFrequencyEncoder.encode; - final decode = TokenFrequencyEncoder.decode; + const encode = TokenFrequencyEncoder.encode; + const decode = TokenFrequencyEncoder.decode; final data = readStringData('token_frequency'); test('check data', () async {