From baa64f23d7629c46e61584d453e514a044362987 Mon Sep 17 00:00:00 2001 From: Nishant Kumar Date: Mon, 28 Aug 2023 14:50:48 +0530 Subject: [PATCH 1/9] feat(SDK-3210): Adds encryption in iOS - Added support to core iOS v5.2.0 to support encryption of PII data. --- example/ios/Podfile.lock | 10 ++-- example/pubspec.lock | 100 +++++++++++++---------------------- ios/clevertap_plugin.podspec | 2 +- 3 files changed, 42 insertions(+), 70 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 351f37e..35af24f 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,8 +1,8 @@ PODS: - - CleverTap-iOS-SDK (5.1.2): + - CleverTap-iOS-SDK (5.2.0): - SDWebImage (~> 5.11) - clevertap_plugin (1.7.0): - - CleverTap-iOS-SDK (= 5.1.2) + - CleverTap-iOS-SDK (= 5.2.0) - Flutter - Flutter (1.0.0) - SDWebImage (5.17.0): @@ -25,11 +25,11 @@ EXTERNAL SOURCES: :path: Flutter SPEC CHECKSUMS: - CleverTap-iOS-SDK: 1731f365b7822458c346fb812bd0f0edbf076856 - clevertap_plugin: 9de7bd7d23e171d2d347e051d5fd9ec75ee83ce2 + CleverTap-iOS-SDK: 6a38eea6d2f0c336fb142baadcca2cd8aafd2290 + clevertap_plugin: 3bdba39d5b71cf5d9c40eb8a077efd5e2423eb43 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9 PODFILE CHECKSUM: cf0c950f7e9a456b4e325f5b8fc0f98906a3705a -COCOAPODS: 1.12.0 +COCOAPODS: 1.11.3 diff --git a/example/pubspec.lock b/example/pubspec.lock index 8e55bd0..24c9493 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,26 +5,23 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.11.0" + version: "2.9.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.2.1" clevertap_plugin: dependency: "direct dev" description: @@ -36,32 +33,28 @@ packages: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.17.1" + version: "1.16.0" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.0.5" fake_async: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.3.1" flutter: @@ -78,8 +71,7 @@ packages: dependency: "direct main" description: name: flutter_styled_toast - sha256: cc32aed2a49ce77a1ed5844073c6c0f5e381c81fd6d694e0ba3c5dc2a645963d - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "2.1.3" flutter_test: @@ -91,50 +83,37 @@ packages: dependency: transitive description: name: intl - sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "0.18.0" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" + version: "0.17.0" matcher: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "0.12.15" + version: "0.12.12" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.1.5" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.9.1" + version: "1.8.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.8.3" + version: "1.8.2" sky_engine: dependency: transitive description: flutter @@ -144,58 +123,51 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.9.1" + version: "1.9.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.1.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "0.5.1" + version: "0.4.12" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" + url: "https://pub.dartlang.org" source: hosted - version: "2.1.4" + version: "2.1.2" sdks: - dart: ">=3.0.0-0 <4.0.0" + dart: ">=2.17.0 <3.0.0" flutter: ">=1.17.0" diff --git a/ios/clevertap_plugin.podspec b/ios/clevertap_plugin.podspec index b0f8ac1..9d11f77 100644 --- a/ios/clevertap_plugin.podspec +++ b/ios/clevertap_plugin.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.dependency 'CleverTap-iOS-SDK', '5.1.2' + s.dependency 'CleverTap-iOS-SDK', '5.2.0' s.ios.deployment_target = '9.0' end From f3dd3de03f546d3f21092de73282d2edc42563db Mon Sep 17 00:00:00 2001 From: Nishant Kumar Date: Mon, 28 Aug 2023 14:56:19 +0530 Subject: [PATCH 2/9] added usage docs for Encryption for iOS and Android. --- doc/Usage.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/Usage.md b/doc/Usage.md index 96a8c45..07a60b2 100644 --- a/doc/Usage.md +++ b/doc/Usage.md @@ -636,6 +636,23 @@ CleverTapPlugin.setOffline(true); ## Push primer for notification Permission (Android and iOS) Follow the [Push Primer integration doc](PushPrimer.md). +## Encryption of PII data (Android and iOS) +PII data is stored across the SDK and could be sensitive information. From CleverTap Flutter SDK v1.9.0 onwards, you can enable encryption for PII data wiz. Email, Identity, Name and Phone. + +Currently 2 levels of encryption are supported i.e None(0) and Medium(1). Encryption level is None by default. +**None** - All stored data is in plaintext +**Medium** - PII data is encrypted completely. + +#### Android +Add encryption level in the `AndroidManifest.xml` as following: +```XML + +``` +#### iOS +Add the `CleverTapEncryptionLevel` String key to `info.plist` file where value 1 means Medium and 0 means None. Encryption Level will be None if any other value is provided. + ### For more information, From 996d4c5040e708cac61bc7196f542e3030370960 Mon Sep 17 00:00:00 2001 From: Nishant Kumar Date: Mon, 28 Aug 2023 15:00:08 +0530 Subject: [PATCH 3/9] updated flutter library version --- example/pubspec.lock | 2 +- lib/clevertap_plugin.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 24c9493..36c9a9e 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -28,7 +28,7 @@ packages: path: ".." relative: true source: path - version: "1.8.1" + version: "1.9.0" clock: dependency: transitive description: diff --git a/lib/clevertap_plugin.dart b/lib/clevertap_plugin.dart index 44ae067..5848dcb 100644 --- a/lib/clevertap_plugin.dart +++ b/lib/clevertap_plugin.dart @@ -54,7 +54,7 @@ class CleverTapPlugin { factory CleverTapPlugin() => _clevertapPlugin; static const libName = 'Flutter'; - static const libVersion = 10801; // If the current version is X.X.X then pass as X0X0X + static const libVersion = 10900; // If the current version is X.X.X then pass as X0X0X CleverTapPlugin._internal() { /// Set the CleverTap Flutter library name and the current version for version tracking diff --git a/pubspec.yaml b/pubspec.yaml index 96f4907..85b93c3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: clevertap_plugin description: The CleverTap Flutter SDK for Mobile Customer Engagement,Analytics and Retention solutions. -version: 1.8.1 +version: 1.9.0 homepage: https://github.com/CleverTap/clevertap-flutter environment: From 1ac5e50737595b5e3d98e863d48c692d8e7a96bd Mon Sep 17 00:00:00 2001 From: Nishant Kumar Date: Mon, 28 Aug 2023 15:19:53 +0530 Subject: [PATCH 4/9] added changelog for iOS part --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a87a18..a567852 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ ## CHANGE LOG +### Version 1.9.0 *(29th August 2023)* +------------------------------------------- +**What's new** +* **[Android Platform]** + +* **[iOS Platform]** + * Supports [CleverTap iOS SDK v5.2.0](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/5.2.0). + +* **[Android and iOS Platform]** + * Adds support for encryption of PII data wiz. Email, Identity, Name and Phone. Please refer to [Usage.md](https://github.com/CleverTap/clevertap-flutter/blob/master/doc/Usage.md#encryption-of-pii-data) file to read more on how to enable/disable encryption of PII data. + * Adds support for custom KV pairs common to all inbox messages in App Inbox. + ### Version 1.8.1 *(31st July 2023)* ------------------------------------------- **What's new** From d409fffd1d02e654c1bb3e51ab2b0a451f9b1757 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Tue, 29 Aug 2023 10:59:39 +0530 Subject: [PATCH 5/9] task(SDK-3209): update clevertap android sdk to v5.2.0 --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 6e006e6..20355ea 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ group 'com.clevertap.clevertap_plugin' -version '1.7.0' +version '1.9.0' buildscript { repositories { @@ -42,7 +42,7 @@ android { dependencies { testImplementation 'junit:junit:4.13.2' - api 'com.clevertap.android:clevertap-android-sdk:5.1.0' + api 'com.clevertap.android:clevertap-android-sdk:5.2.0' compileOnly 'androidx.fragment:fragment:1.3.6' compileOnly 'androidx.core:core:1.9.0' } From 379a56a0dcd066d0ab268015f532fddee5cd8d59 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Tue, 29 Aug 2023 12:16:12 +0530 Subject: [PATCH 6/9] doc(SDK-3209): update changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a567852..f632ef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ------------------------------------------- **What's new** * **[Android Platform]** + * Supports [CleverTap Android SDK v5.2.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md#version-520-august-10-2023). * **[iOS Platform]** * Supports [CleverTap iOS SDK v5.2.0](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/5.2.0). @@ -12,6 +13,11 @@ * Adds support for encryption of PII data wiz. Email, Identity, Name and Phone. Please refer to [Usage.md](https://github.com/CleverTap/clevertap-flutter/blob/master/doc/Usage.md#encryption-of-pii-data) file to read more on how to enable/disable encryption of PII data. * Adds support for custom KV pairs common to all inbox messages in App Inbox. +**Bug Fixes** +* **[Android Platform]** + * Fixes [#393](https://github.com/CleverTap/clevertap-android-sdk/issues/393) - push permission flow crash when context in CoreMetadata is null. + * Fixes a bug where addMultiValueForKey and addMultiValuesForKey were overwriting the current values of the user properties instead of appending it. + ### Version 1.8.1 *(31st July 2023)* ------------------------------------------- **What's new** @@ -26,6 +32,7 @@ **What's new** * Supports [CleverTap Android SDK v5.1.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md#version-510-june-28-2023) * Supports [CleverTap iOS SDK v5.1.1](https://github.com/CleverTap/clevertap-ios-sdk/blob/master/CHANGELOG.md#version-511-july-13-2023) +* ***Note: RenderMax Push SDK functionality is now supported directly within the CleverTap Core SDK***. Please remove the integrated *RenderMax SDK* before you upgrade to CleverTap Flutter SDK for this 1.8.0 version. * Adds support for **notification click handling when the app is terminated or killed**. The CleverTap plugin provides two ways to handle user interactions with notifications, depending on whether the app needs to perform UI or non-UI operations. * Use `CleverTapPlugin.getAppLaunchNotification()` to perform UI impacting operation like redirecting the user to a specific page. * Use `CleverTapPlugin.onKilledStateNotificationClicked(_onKilledStateNotificationClickedHandler)` to perform non-UI operation like performing HTTP requests, IO operations with local storage etc. From 2c0e43a6cf805178a980845cd11b8ce4cb07dab8 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Tue, 29 Aug 2023 15:37:31 +0530 Subject: [PATCH 7/9] task(SDK-3209): add platform check for getAppLaunchNotification API usage --- example/lib/main.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index bf2a113..a0ac44a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -53,7 +53,9 @@ class _MyAppState extends State { initPlatformState(); activateCleverTapFlutterPluginHandlers(); CleverTapPlugin.setDebugLevel(3); - _handleKilledStateNotificationInteraction(); + if (Platform.isAndroid) { + _handleKilledStateNotificationInteraction(); + } CleverTapPlugin.createNotificationChannel( "fluttertest", "Flutter Test", "Flutter Test", 3, true); CleverTapPlugin.initializeInbox(); From 4b7b88ee4019f36a5674834b95f0ca9af27be384 Mon Sep 17 00:00:00 2001 From: Shivam Sharma Date: Tue, 29 Aug 2023 16:19:46 +0530 Subject: [PATCH 8/9] doc(SDK-3209): update usage.md --- doc/Usage.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/Usage.md b/doc/Usage.md index 07a60b2..7c629eb 100644 --- a/doc/Usage.md +++ b/doc/Usage.md @@ -371,7 +371,9 @@ class _Application extends State { // Run CleverTapPlugin.getAppLaunchNotification in an async function // as initState() must not be async - _handleKilledStateNotificationInteraction(); + if (Platform.isAndroid) { + _handleKilledStateNotificationInteraction(); + } } @override From 3f94fefddd3eb5ec6116f794a7d0fab1d24a3376 Mon Sep 17 00:00:00 2001 From: Nishant Kumar Date: Tue, 29 Aug 2023 16:38:20 +0530 Subject: [PATCH 9/9] Updated README.md to set latest Flutter SDK version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ca45cac..bf7a1f8 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ To get started, sign up [here](https://clevertap.com/live-product-demo/). ```yaml dependencies: -clevertap_plugin: 1.6.1 +clevertap_plugin: 1.9.0 ``` - Run `flutter packages get` to install the SDK