diff --git a/Assets/Adjust/Android/AdjustAndroid.cs b/Assets/Adjust/Android/AdjustAndroid.cs index 904560c9..6b1dd5a0 100644 --- a/Assets/Adjust/Android/AdjustAndroid.cs +++ b/Assets/Adjust/Android/AdjustAndroid.cs @@ -8,7 +8,7 @@ namespace com.adjust.sdk #if UNITY_ANDROID public class AdjustAndroid { - private const string sdkPrefix = "unity4.26.1"; + private const string sdkPrefix = "unity4.27.0"; private static bool launchDeferredDeeplink = true; private static AndroidJavaClass ajcAdjust = new AndroidJavaClass("com.adjust.sdk.Adjust"); private static AndroidJavaObject ajoCurrentActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic("currentActivity"); @@ -135,6 +135,11 @@ public static void Start(AdjustConfig adjustConfig) AndroidJavaObject ajoUrlStrategyIndia = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic("URL_STRATEGY_INDIA"); ajoAdjustConfig.Call("setUrlStrategy", ajoUrlStrategyIndia); } + else if (adjustConfig.urlStrategy == AdjustConfig.AdjustDataResidencyEU) + { + AndroidJavaObject ajoDataResidencyEU = new AndroidJavaClass("com.adjust.sdk.AdjustConfig").GetStatic("DATA_RESIDENCY_EU"); + ajoAdjustConfig.Call("setUrlStrategy", ajoDataResidencyEU); + } } // Check if user has set app secret. diff --git a/Assets/Adjust/Android/adjust-android.jar b/Assets/Adjust/Android/adjust-android.jar index c2065af4..efb88fd1 100644 Binary files a/Assets/Adjust/Android/adjust-android.jar and b/Assets/Adjust/Android/adjust-android.jar differ diff --git a/Assets/Adjust/Unity/AdjustConfig.cs b/Assets/Adjust/Unity/AdjustConfig.cs index a181311e..77b4a1f8 100644 --- a/Assets/Adjust/Unity/AdjustConfig.cs +++ b/Assets/Adjust/Unity/AdjustConfig.cs @@ -7,6 +7,8 @@ public class AdjustConfig public const string AdjustUrlStrategyChina = "china"; public const string AdjustUrlStrategyIndia = "india"; + public const string AdjustDataResidencyEU = "data-residency-eu"; + public const string AdjustAdRevenueSourceMopub = "mopub"; public const string AdjustAdRevenueSourceAdmob = "admob"; public const string AdjustAdRevenueSourceFbNativeAd = "facebook_native_ad"; diff --git a/Assets/Adjust/Windows/AdjustWindows.cs b/Assets/Adjust/Windows/AdjustWindows.cs index 46a7db06..0c856ac9 100644 --- a/Assets/Adjust/Windows/AdjustWindows.cs +++ b/Assets/Adjust/Windows/AdjustWindows.cs @@ -17,7 +17,7 @@ namespace com.adjust.sdk { public class AdjustWindows { - private const string sdkPrefix = "unity4.26.1"; + private const string sdkPrefix = "unity4.27.0"; private static bool appLaunched = false; public static void Start(AdjustConfig adjustConfig) diff --git a/Assets/Adjust/iOS/Adjust.h b/Assets/Adjust/iOS/Adjust.h index 29461674..9f03b411 100644 --- a/Assets/Adjust/iOS/Adjust.h +++ b/Assets/Adjust/iOS/Adjust.h @@ -2,7 +2,7 @@ // Adjust.h // Adjust // -// V4.26.1 +// V4.27.1 // Created by Christian Wellenbrock (wellle) on 23rd July 2013. // Copyright © 2012-2017 Adjust GmbH. All rights reserved. // @@ -67,6 +67,7 @@ extern NSString * __nonnull const ADJAdRevenueSourceTapdaq; */ extern NSString * __nonnull const ADJUrlStrategyIndia; extern NSString * __nonnull const ADJUrlStrategyChina; +extern NSString * __nonnull const ADJDataResidencyEU; /** * @brief The main interface to Adjust. diff --git a/Assets/Adjust/iOS/AdjustSdk.a b/Assets/Adjust/iOS/AdjustSdk.a index 49510b59..edf25896 100644 Binary files a/Assets/Adjust/iOS/AdjustSdk.a and b/Assets/Adjust/iOS/AdjustSdk.a differ diff --git a/Assets/Adjust/iOS/AdjustUnity.mm b/Assets/Adjust/iOS/AdjustUnity.mm index 0329cfb2..3208d3d6 100644 --- a/Assets/Adjust/iOS/AdjustUnity.mm +++ b/Assets/Adjust/iOS/AdjustUnity.mm @@ -227,6 +227,8 @@ void _AdjustLaunchApp(const char* appToken, [adjustConfig setUrlStrategy:ADJUrlStrategyChina]; } else if ([stringUrlStrategy isEqualToString:@"india"]) { [adjustConfig setUrlStrategy:ADJUrlStrategyIndia]; + } else if ([stringUrlStrategy isEqualToString:@"data-residency-eu"]) { + [adjustConfig setUrlStrategy:ADJDataResidencyEU]; } } diff --git a/Assets/Adjust/iOS/AdjustiOS.cs b/Assets/Adjust/iOS/AdjustiOS.cs index 8887c5f5..c1a6efe5 100644 --- a/Assets/Adjust/iOS/AdjustiOS.cs +++ b/Assets/Adjust/iOS/AdjustiOS.cs @@ -8,7 +8,7 @@ namespace com.adjust.sdk #if UNITY_IOS public class AdjustiOS { - private const string sdkPrefix = "unity4.26.1"; + private const string sdkPrefix = "unity4.27.0"; [DllImport("__Internal")] private static extern void _AdjustLaunchApp( diff --git a/Assets/Adjust/iOS/Test/AdjustTestLibrary.a b/Assets/Adjust/iOS/Test/AdjustTestLibrary.a index 7c26d92f..0e0d671a 100644 Binary files a/Assets/Adjust/iOS/Test/AdjustTestLibrary.a and b/Assets/Adjust/iOS/Test/AdjustTestLibrary.a differ diff --git a/Assets/AdjustOaid/Android/adjust-android-oaid.jar b/Assets/AdjustOaid/Android/adjust-android-oaid.jar index ee07e0ef..d15c36ed 100644 Binary files a/Assets/AdjustOaid/Android/adjust-android-oaid.jar and b/Assets/AdjustOaid/Android/adjust-android-oaid.jar differ diff --git a/CHANGELOG.md b/CHANGELOG.md index 9da5045f..7d969f0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +### Version 4.27.0 (29th March 2021) +#### Added +- Added data residency feature. Support for EU data residency region is added. You can choose this setting by calling `setUrlStrategy` method of `AdjustConfig` instance with `AdjustConfig.AdjustDataResidencyEU` parameter. +- Added preinstall tracking with usage of system installer receiver on Android platform. +- Added support for MSA SDK v1.0.25 to OAID plugin. + +#### Fixed +- Fixed attribution value comparison logic which might cause same attribution value to be delivered into attribution callback on iOS platform. + +#### Native SDKs +- [iOS@v4.27.1][ios_sdk_v4.27.1] +- [Android@v4.27.0][android_sdk_v4.27.0] +- [Windows@v4.17.0][windows_sdk_v4.17.0] + +--- + ### Version 4.26.1 (12th February 2021) #### Fixed - Fixed ambiguous API invocation error in certain Unity IDE setups. @@ -851,6 +867,7 @@ [ios_sdk_v4.23.2]: https://github.com/adjust/ios_sdk/tree/v4.23.2 [ios_sdk_v4.24.0]: https://github.com/adjust/ios_sdk/tree/v4.24.0 [ios_sdk_v4.26.2]: https://github.com/adjust/ios_sdk/tree/v4.26.2 +[ios_sdk_v4.27.1]: https://github.com/adjust/ios_sdk/tree/v4.27.1 [android_sdk_v3.5.0]: https://github.com/adjust/android_sdk/tree/v3.5.0 [android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0 @@ -882,6 +899,7 @@ [android_sdk_v4.24.1]: https://github.com/adjust/android_sdk/tree/v4.24.1 [android_sdk_v4.25.0]: https://github.com/adjust/android_sdk/tree/v4.25.0 [android_sdk_v4.26.1]: https://github.com/adjust/android_sdk/tree/v4.26.1 +[android_sdk_v4.27.0]: https://github.com/adjust/android_sdk/tree/v4.27.0 [windows_sdk_v4.12.0]: https://github.com/adjust/windows_sdk/tree/v4.12.0 [windows_sdk_v4.13.0]: https://github.com/adjust/windows_sdk/tree/v4.13.0 diff --git a/README.md b/README.md index e195a972..6b7d3409 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Read this in other languages: [English][en-readme], [中文][zh-readme], [日本 * [Google Play Services advertising identifier](#ad-gps-adid) * [Amazon advertising identifier](#ad-amazon-adid) * [Adjust device identifier](#ad-adid) - * [Pre-installed trackers](#ad-pre-installed-trackers) + * [Preinstalled apps](#ad-preinstalled-apps) * [Offline mode](#ad-offline-mode) * [Disable tracking](#ad-disable-tracking) * [Event buffering](#ad-event-buffering) @@ -83,6 +83,7 @@ Read this in other languages: [English][en-readme], [中文][zh-readme], [日本 * [Disable third-party sharing](#ad-disable-third-party-sharing) * [Enable third-party sharing](#ad-enable-third-party-sharing) * [Measurement consent](#ad-measurement-consent) + * [Data residency](#ad-data-residency) ### Testing and troubleshooting * [Debug information in iOS](#tt-debug-ios) @@ -946,28 +947,76 @@ String adid = Adjust.getAdid(); Information about the adid is only available after our backend tracks the app install. It is not possible to access the adid value before the SDK has been initialized and the installation of your app has been successfully tracked. -### Pre-installed trackers +### Preinstalled apps -To use the Adjust SDK to recognize users whose devices came with your app pre-installed, follow these steps: +You can use the Adjust SDK to recognize users whose devices had your app preinstalled during manufacturing. Adjust offers two solutions: one which uses the system payload, and one which uses a default tracker. -1. Create a new tracker in your [dashboard]. -2. Set the default tracker of your `AdjustConfig`: +In general, we recommend using the system payload solution. However, there are certain use cases which may require the tracker. First check the available [implementation methods](https://help.adjust.com/en/article/pre-install-tracking#Implementation_methods) and your preinstall partner’s preferred method. If you are unsure which solution to implement, reach out to integration@adjust.com - ```cs - AdjustConfig adjustConfig = new AdjustConfig(appToken, environment); +#### Use the system payload + +- The Content Provider, System Properties, or File System method is supported from SDK v4.23.0 and above. + +- The System Installer Receiver method is supported from SDK v4.27.0 and above. + +Enable the Adjust SDK to recognise preinstalled apps by calling `setPreinstallTrackingEnabled` with the parameter `true` after creating the config object: + + +```csharp +adjustConfig.setPreinstallTrackingEnabled(true); +``` + +Depending upon your implmentation method, you may need to make a change to your `AndroidManifest.xml` file. Find the required code change using the table below. + + + + + + + + + + + + + + +
+ Method + + AndroidManifest.xml change +
Content ProviderAdd permission:
+ +``` + +``` +
System Installer ReceiverDeclare receiver:
+ +``` + + + + + +``` +
+ +#### Use a default tracker + +- Create a new tracker in your [dashboard]. +- Open your app delegate and set the default tracker of your config: + + ```csharp adjustConfig.setDefaultTracker("{TrackerToken}"); - Adjust.start(adjustConfig); ``` - Replace `{TrackerToken}` with the tracker token you created in step 2. E.g. `{abc123}` - -Although the dashboard displays a tracker URL (including `http://app.adjust.com/`), in your source code you should only enter the six or seven-character token and not the entire URL. +- Replace `{TrackerToken}` with the tracker token you created in step one. Please note that the dashboard displays a tracker URL (including `http://app.adjust.com/`). In your source code, you should specify only the six or seven-character token and not the entire URL. -3. Build and run your app. You should see a line like the following in the log output: +- Build and run your app. You should see a line like the following in your LogCat: - ``` - Default tracker: 'abc123' - ``` + ``` + Default tracker: 'abc123' + ``` ### Offline mode @@ -1078,6 +1127,14 @@ Adjust.trackMeasurementConsent(true); Upon receiving this information, Adjust changes sharing the specific user's data to partners. The Adjust SDK will continue to work as expected. +### Data residency + +In order to enable data residency feature, make sure to make a call to `setUrlStrategy` method of the `AdjustConfig` instance with one of the following constants: + +```csharp +adjustConfig.setUrlStrategy(AdjustConfig.AdjustDataResidencyEU); // for EU data residency region +``` + ## Testing and troubleshooting ### Debug information in iOS diff --git a/VERSION b/VERSION index b02da5e2..02bb6671 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.26.1 +4.27.0 diff --git a/doc/english/migration/migrate.md b/doc/english/migration/migrate.md index 26a7e493..677c6f7d 100644 --- a/doc/english/migration/migrate.md +++ b/doc/english/migration/migrate.md @@ -1,4 +1,4 @@ -## Migrate your Adjust SDK for Unity3d to 4.26.1 from 3.4.4 +## Migrate your Adjust SDK for Unity3d to 4.27.0 from 3.4.4 ### Migration procedure diff --git a/ext/android/sdk b/ext/android/sdk index b98369d9..4d69036b 160000 --- a/ext/android/sdk +++ b/ext/android/sdk @@ -1 +1 @@ -Subproject commit b98369d9a3f94ccd8764b636f41ede63a3b63927 +Subproject commit 4d69036bf44285c03dff4d3ed94ef7839bc17a59 diff --git a/ext/ios/sdk b/ext/ios/sdk index a9985f22..b4e48aed 160000 --- a/ext/ios/sdk +++ b/ext/ios/sdk @@ -1 +1 @@ -Subproject commit a9985f222dcdc47c3fc1208099ad1e311c890fc2 +Subproject commit b4e48aed6273c55aa644b12d47711193001fa077 diff --git a/scripts/build_sdk_android.py b/scripts/build_sdk_android.py index 98a58ac0..47accaa0 100755 --- a/scripts/build_sdk_android.py +++ b/scripts/build_sdk_android.py @@ -35,15 +35,26 @@ def build(root_dir, android_submodule_dir, with_test_lib): # Paths. set_log_tag('ANDROID-TEST-LIB-BUILD') debug_green('Building Test Library started ...') - test_jar_in_dir = '{0}/test-library/build/libs'.format(src_dir) - test_jar_out_dir = '{0}/Assets/Adjust/Android/Test'.format(root_dir) + test_library_in_dir = '{0}/test-library/build/outputs/aar'.format(src_dir) + test_options_in_dir = '{0}/test-options/build/outputs/aar'.format(src_dir) + test_unity_out_dir = '{0}/Assets/Adjust/Android/Test'.format(root_dir) # ------------------------------------------------------------------ - # Building Android test library JAR in debug mode. - debug_green('Building Adjust test library JAR in debug mode ...') - gradle_make_test_jar_debug() + # Building Android test library AAR in debug mode. + debug_green('Building Adjust test library AAR in debug mode ...') + gradle_make_test_library_aar_debug() # ------------------------------------------------------------------ - # Copy Android test library JAR from to destination. - debug_green('Copying generated Android test library JAR from {0} to {1} ...'.format(test_jar_in_dir, test_jar_out_dir)) - copy_file('{0}/test-library-debug.jar'.format(test_jar_in_dir), '{0}/adjust-test.jar'.format(test_jar_out_dir)) + # Copy Android test library AAR from to destination. + debug_green('Copying generated Android test library AAR from {0} to {1} ...'.format(test_library_in_dir, test_unity_out_dir)) + copy_file('{0}/test-library-debug.aar'.format(test_library_in_dir), '{0}/adjust-test-library.aar'.format(test_unity_out_dir)) + + # ------------------------------------------------------------------ + # Building Android test options AAR in debug mode. + debug_green('Building Adjust test options AAR in debug mode ...') + gradle_make_test_options_aar_debug() + + # ------------------------------------------------------------------ + # Copy Android test options AAR from to destination. + debug_green('Copying generated Android test options AAR from {0} to {1} ...'.format(test_options_in_dir, test_unity_out_dir)) + copy_file('{0}/test-options-debug.aar'.format(test_options_in_dir), '{0}/adjust-test-options.aar'.format(test_unity_out_dir)) diff --git a/scripts/scripting_utils.py b/scripts/scripting_utils.py index af73aa52..c994faba 100755 --- a/scripts/scripting_utils.py +++ b/scripts/scripting_utils.py @@ -161,6 +161,18 @@ def gradle_make_test_jar_debug(): def gradle_make_test_jar_release(): execute_command(['./gradlew', 'clean', ':test-library:adjustTestLibraryJarRelease']) +def gradle_make_test_library_aar_debug(): + execute_command(['./gradlew', 'clean', ':test-library:assembleDebug']) + +def gradle_make_test_library_aar_release(): + execute_command(['./gradlew', 'clean', ':test-library:assembleRelease']) + +def gradle_make_test_options_aar_debug(): + execute_command(['./gradlew', 'clean', ':test-options:assembleDebug']) + +def gradle_make_test_options_aar_release(): + execute_command(['./gradlew', 'clean', ':test-options:assembleRelease']) + def gradle_make_oaid_jar_release(): execute_command(['./gradlew', 'clean', ':sdk-plugin-oaid:adjustOaidAndroidJar'])