diff --git a/CHANGELOG.md b/CHANGELOG.md index d62bb13..3acb94a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +### Version 4.18.0 (3rd July 2019) +#### Added +- Added `TrackAdRevenue` method to `Adjust` interface to allow tracking of ad revenue. With this release added support for `MoPub` ad revenue tracking. +- Added reading of Facebook anonymous ID if available on iOS platform. + +#### Native SDKs +- [iOS@v4.18.0][ios_sdk_v4.18.0] +- [Android@v4.18.0][android_sdk_v4.18.0] + +--- + ### Version 4.17.0 (14th January 2019) #### Added - Added `SdkVersion` property to `Adjust` interface to obtain current SDK version string. @@ -191,9 +202,11 @@ [ios_sdk_v4.13.0]: https://github.com/adjust/ios_sdk/tree/v4.13.0 [ios_sdk_v4.14.1]: https://github.com/adjust/ios_sdk/tree/v4.14.1 [ios_sdk_v4.17.1]: https://github.com/adjust/ios_sdk/tree/v4.17.1 +[ios_sdk_v4.18.0]: https://github.com/adjust/ios_sdk/tree/v4.18.0 [android_sdk_v4.12.0]: https://github.com/adjust/android_sdk/tree/v4.12.0 [android_sdk_v4.12.4]: https://github.com/adjust/android_sdk/tree/v4.12.4 [android_sdk_v4.13.0]: https://github.com/adjust/android_sdk/tree/v4.13.0 [android_sdk_v4.14.0]: https://github.com/adjust/android_sdk/tree/v4.14.0 [android_sdk_v4.17.0]: https://github.com/adjust/android_sdk/tree/v4.17.0 +[android_sdk_v4.18.0]: https://github.com/adjust/android_sdk/tree/v4.18.0 diff --git a/VERSION b/VERSION index 43b5827..b30c4dc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.17.0 +4.18.0 diff --git a/android/AdjustSdk.Xamarin.Android/AdjustSdk.Xamarin.Android.csproj b/android/AdjustSdk.Xamarin.Android/AdjustSdk.Xamarin.Android.csproj index cd1a885..4285176 100644 --- a/android/AdjustSdk.Xamarin.Android/AdjustSdk.Xamarin.Android.csproj +++ b/android/AdjustSdk.Xamarin.Android/AdjustSdk.Xamarin.Android.csproj @@ -1,6 +1,6 @@ - + Debug AnyCPU @@ -13,7 +13,7 @@ Resources Assets AdjustSdk.Xamarin.Android - 4.17.0 + 4.18.0 Adjust GmbH This is the Xamarin Android SDK of Adjust. http://www.adjust.com true @@ -71,5 +71,5 @@ - + diff --git a/android/AdjustSdk.Xamarin.Android/Jars/adjust-android.jar b/android/AdjustSdk.Xamarin.Android/Jars/adjust-android.jar index 676b992..27b15ee 100644 Binary files a/android/AdjustSdk.Xamarin.Android/Jars/adjust-android.jar and b/android/AdjustSdk.Xamarin.Android/Jars/adjust-android.jar differ diff --git a/android/AdjustSdk.Xamarin.Android/Properties/AssemblyInfo.cs b/android/AdjustSdk.Xamarin.Android/Properties/AssemblyInfo.cs index d875d88..8cfded9 100644 --- a/android/AdjustSdk.Xamarin.Android/Properties/AssemblyInfo.cs +++ b/android/AdjustSdk.Xamarin.Android/Properties/AssemblyInfo.cs @@ -18,7 +18,7 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("4.17.0")] +[assembly: AssemblyVersion("4.18.0")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/android/AdjustSdk.Xamarin.Android/packages.config b/android/AdjustSdk.Xamarin.Android/packages.config index 90a19f6..956f51d 100644 --- a/android/AdjustSdk.Xamarin.Android/packages.config +++ b/android/AdjustSdk.Xamarin.Android/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/android/Example/Example.csproj b/android/Example/Example.csproj index ca86ed9..2d3f40a 100644 --- a/android/Example/Example.csproj +++ b/android/Example/Example.csproj @@ -9,7 +9,7 @@ Library Example Example - v8.1 + v9.0 True Resources\Resource.designer.cs Resource @@ -74,34 +74,34 @@ ..\packages\Xamarin.GooglePlayServices.Analytics.60.1142.1\lib\MonoAndroid80\Xamarin.GooglePlayServices.Analytics.dll - ..\packages\Xamarin.Android.Support.Annotations.27.0.2.1\lib\MonoAndroid81\Xamarin.Android.Support.Annotations.dll + ..\packages\Xamarin.Android.Support.Annotations.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.Annotations.dll - ..\packages\Xamarin.Android.Arch.Core.Common.1.0.0.1\lib\MonoAndroid80\Xamarin.Android.Arch.Core.Common.dll + ..\packages\Xamarin.Android.Arch.Core.Common.1.1.1.1\lib\monoandroid81\Xamarin.Android.Arch.Core.Common.dll - ..\packages\Xamarin.Android.Arch.Lifecycle.Common.1.0.3.1\lib\MonoAndroid80\Xamarin.Android.Arch.Lifecycle.Common.dll + ..\packages\Xamarin.Android.Arch.Lifecycle.Common.1.1.1.1\lib\monoandroid81\Xamarin.Android.Arch.Lifecycle.Common.dll - ..\packages\Xamarin.Android.Arch.Lifecycle.Runtime.1.0.3.1\lib\MonoAndroid80\Xamarin.Android.Arch.Lifecycle.Runtime.dll + ..\packages\Xamarin.Android.Arch.Lifecycle.Runtime.1.1.1.1\lib\monoandroid81\Xamarin.Android.Arch.Lifecycle.Runtime.dll - ..\packages\Xamarin.Android.Support.Compat.27.0.2.1\lib\MonoAndroid81\Xamarin.Android.Support.Compat.dll + ..\packages\Xamarin.Android.Support.Compat.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.Compat.dll - ..\packages\Xamarin.Android.Support.Core.UI.27.0.2.1\lib\MonoAndroid81\Xamarin.Android.Support.Core.UI.dll + ..\packages\Xamarin.Android.Support.Core.UI.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.Core.UI.dll - ..\packages\Xamarin.Android.Support.Core.Utils.27.0.2.1\lib\MonoAndroid81\Xamarin.Android.Support.Core.Utils.dll + ..\packages\Xamarin.Android.Support.Core.Utils.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.Core.Utils.dll - ..\packages\Xamarin.Android.Support.Fragment.27.0.2.1\lib\MonoAndroid81\Xamarin.Android.Support.Fragment.dll + ..\packages\Xamarin.Android.Support.Fragment.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.Fragment.dll - ..\packages\Xamarin.Android.Support.Media.Compat.27.0.2.1\lib\MonoAndroid81\Xamarin.Android.Support.Media.Compat.dll + ..\packages\Xamarin.Android.Support.Media.Compat.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.Media.Compat.dll - ..\packages\Xamarin.Android.Support.v4.27.0.2.1\lib\MonoAndroid81\Xamarin.Android.Support.v4.dll + ..\packages\Xamarin.Android.Support.v4.28.0.0.1\lib\monoandroid81\Xamarin.Android.Support.v4.dll @@ -147,14 +147,14 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/android/Example/packages.config b/android/Example/packages.config index 165fb79..b938c6c 100644 --- a/android/Example/packages.config +++ b/android/Example/packages.config @@ -1,15 +1,15 @@  - - - - - - - - - - + + + + + + + + + + diff --git a/android/Test/TestApp/AdjustCommandExecutor.cs b/android/Test/TestApp/AdjustCommandExecutor.cs index faf933d..bbb88cc 100644 --- a/android/Test/TestApp/AdjustCommandExecutor.cs +++ b/android/Test/TestApp/AdjustCommandExecutor.cs @@ -3,6 +3,7 @@ using Android.Content; using Com.Adjust.Sdk; using Com.Adjust.Test; +using Org.Json; using Uri = Android.Net.Uri; namespace TestApp @@ -64,6 +65,7 @@ public void ExecuteCommand(Command command) case "openDeeplink": OpenDeeplink(); break; case "sendReferrer": SendReferrer(); break; case "gdprForgetMe": GdprForgetMe(); break; + case "trackAdRevenue" : TrackAdRevenue(); break; } } catch (Exception ex) @@ -647,5 +649,13 @@ private void SendReferrer() String referrer = Command.GetFirstParameterValue("referrer"); Adjust.SetReferrer(referrer, _context); } + + private void TrackAdRevenue() + { + var source = Command.GetFirstParameterValue("adRevenueSource"); + var payload = Command.GetFirstParameterValue("adRevenueJsonString"); + JSONObject jsonPayload = new JSONObject(payload); + Adjust.TrackAdRevenue(source, jsonPayload); + } } } diff --git a/android/Test/TestApp/MainActivity.cs b/android/Test/TestApp/MainActivity.cs index 9b9fa73..7ee1977 100644 --- a/android/Test/TestApp/MainActivity.cs +++ b/android/Test/TestApp/MainActivity.cs @@ -13,8 +13,10 @@ namespace TestApp DataScheme = "adjust-test")] public class MainActivity : Activity { - public static readonly string BaseUrl = "https://192.168.9.228:8443"; - public static readonly string GdprUrl = "https://192.168.9.228:8443"; + private static readonly string IpAddress = "192.168.8.205"; + public static readonly string BaseUrl = "https://" + IpAddress + ":8443"; + public static readonly string GdprUrl = "https://" + IpAddress + ":8443"; + public static readonly string ControlUrl = "ws://" + IpAddress + ":1987"; private TestLibrary _testLibrary; protected override void OnNewIntent(Intent intent) @@ -30,7 +32,7 @@ protected override void OnCreate(Bundle savedInstanceState) SetContentView(Resource.Layout.Main); CommandListener commandListener = new CommandListener(this); - _testLibrary = new TestLibrary(BaseUrl, commandListener); + _testLibrary = new TestLibrary(BaseUrl, ControlUrl, commandListener); // _testLibrary.DoNotExitAfterEnd(); // _testLibrary.AddTestDirectory("current/gdpr"); // _testLibrary.AddTest("current/gdpr/Test_GdprForgetMe_after_install_kill_before_install"); diff --git a/android/Test/TestApp/Properties/AndroidManifest.xml b/android/Test/TestApp/Properties/AndroidManifest.xml index 5a839ad..bd99c1f 100644 --- a/android/Test/TestApp/Properties/AndroidManifest.xml +++ b/android/Test/TestApp/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/android/Test/TestApp/TestApp.csproj b/android/Test/TestApp/TestApp.csproj index 5fab670..2a9474b 100644 --- a/android/Test/TestApp/TestApp.csproj +++ b/android/Test/TestApp/TestApp.csproj @@ -26,7 +26,7 @@ 4 None - arm64-v8a;armeabi;armeabi-v7a;x86 + dx true @@ -72,14 +72,14 @@ - - {9BD60FFF-D498-422F-B6B9-1EC800DAD6C9} - TestLib - {5A410FCF-04C7-4F1B-ACD8-F87A2E205528} AdjustSdk.Xamarin.Android + + {9BD60FFF-D498-422F-B6B9-1EC800DAD6C9} + TestLib + \ No newline at end of file diff --git a/android/Test/TestLib/Jars/Java-WebSocket-1.3.9.jar b/android/Test/TestLib/Jars/Java-WebSocket-1.3.9.jar new file mode 100644 index 0000000..c031947 Binary files /dev/null and b/android/Test/TestLib/Jars/Java-WebSocket-1.3.9.jar differ diff --git a/android/Test/TestLib/Jars/adjust-test.jar b/android/Test/TestLib/Jars/adjust-test.jar index 88aab01..fb858c9 100644 Binary files a/android/Test/TestLib/Jars/adjust-test.jar and b/android/Test/TestLib/Jars/adjust-test.jar differ diff --git a/android/Test/TestLib/TestLib.csproj b/android/Test/TestLib/TestLib.csproj index 5f3adcd..19ce6c1 100644 --- a/android/Test/TestLib/TestLib.csproj +++ b/android/Test/TestLib/TestLib.csproj @@ -55,6 +55,7 @@ + diff --git a/ext/android/sdk b/ext/android/sdk index 09b13b9..547a74e 160000 --- a/ext/android/sdk +++ b/ext/android/sdk @@ -1 +1 @@ -Subproject commit 09b13b9af945ba13cdcc295842a484aef6951860 +Subproject commit 547a74e3d3147c5248795353c8ede610ac8a3a7a diff --git a/ext/ios/sdk b/ext/ios/sdk index ace81b8..40e4db2 160000 --- a/ext/ios/sdk +++ b/ext/ios/sdk @@ -1 +1 @@ -Subproject commit ace81b8fafeb66285c51dac19562eef03bda94d4 +Subproject commit 40e4db214db32d2863307b0e29a199a0826e062e diff --git a/ios/AdjustSdk.Xamarin.iOS/AdjustSdk.Xamarin.iOS.csproj b/ios/AdjustSdk.Xamarin.iOS/AdjustSdk.Xamarin.iOS.csproj index 2de74f1..50eadb5 100644 --- a/ios/AdjustSdk.Xamarin.iOS/AdjustSdk.Xamarin.iOS.csproj +++ b/ios/AdjustSdk.Xamarin.iOS/AdjustSdk.Xamarin.iOS.csproj @@ -1,6 +1,6 @@ - + Debug AnyCPU @@ -11,7 +11,7 @@ AdjustSdk.Xamarin.iOS Resources AdjustSdk.Xamarin.iOS - 4.17.0 + 4.18.0 Adjust GmbH Adjust GmbH This is the Xamarin iOS SDK of Adjust. http://www.adjust.com @@ -63,5 +63,5 @@ - + diff --git a/ios/AdjustSdk.Xamarin.iOS/ApiDefinition.cs b/ios/AdjustSdk.Xamarin.iOS/ApiDefinition.cs index da9d4d0..d500742 100644 --- a/ios/AdjustSdk.Xamarin.iOS/ApiDefinition.cs +++ b/ios/AdjustSdk.Xamarin.iOS/ApiDefinition.cs @@ -57,6 +57,9 @@ public interface Adjust [Static, Export("sendFirstPackages")] void SendFirstPackages(); + [Static, Export("trackAdRevenue:payload:")] + void TrackAdRevenue(string source, NSData payload); + [Static, Export("gdprForgetMe")] void GdprForgetMe(); diff --git a/ios/AdjustSdk.Xamarin.iOS/Properties/AssemblyInfo.cs b/ios/AdjustSdk.Xamarin.iOS/Properties/AssemblyInfo.cs index 3b8d634..e84cb89 100644 --- a/ios/AdjustSdk.Xamarin.iOS/Properties/AssemblyInfo.cs +++ b/ios/AdjustSdk.Xamarin.iOS/Properties/AssemblyInfo.cs @@ -25,7 +25,7 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("4.17.0")] +[assembly: AssemblyVersion("4.18.0")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/ios/AdjustSdk.Xamarin.iOS/Resources/libAdjust.a b/ios/AdjustSdk.Xamarin.iOS/Resources/libAdjust.a index b620723..574ceaf 100644 Binary files a/ios/AdjustSdk.Xamarin.iOS/Resources/libAdjust.a and b/ios/AdjustSdk.Xamarin.iOS/Resources/libAdjust.a differ diff --git a/ios/AdjustSdk.Xamarin.iOS/packages.config b/ios/AdjustSdk.Xamarin.iOS/packages.config index c7fbc99..12d916e 100644 --- a/ios/AdjustSdk.Xamarin.iOS/packages.config +++ b/ios/AdjustSdk.Xamarin.iOS/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/ios/Test/TestApp/AdjustCommandExecutor.cs b/ios/Test/TestApp/AdjustCommandExecutor.cs index 0ad8770..a6e37dd 100644 --- a/ios/Test/TestApp/AdjustCommandExecutor.cs +++ b/ios/Test/TestApp/AdjustCommandExecutor.cs @@ -43,6 +43,7 @@ public void ExecuteCommand(Command command) case "setPushToken": SetPushToken(); break; case "openDeeplink": OpenDeeplink(); break; case "gdprForgetMe": GdprForgetMe(); break; + case "trackAdRevenue" : TrackAdRevenue(); break; } } catch (Exception ex) @@ -522,6 +523,14 @@ private void OpenDeeplink() Adjust.AppWillOpenUrl(new NSUrl(deeplink)); } + private void TrackAdRevenue() + { + var source = Command.GetFirstParameterValue("adRevenueSource"); + var payload = Command.GetFirstParameterValue("adRevenueJsonString"); + NSData dataPayload = NSData.FromString(payload); + Adjust.TrackAdRevenue(source, dataPayload); + } + private class AdjustDelegateXamarinOptions { public bool SetAttributionChangedDelegate { get; set; } = false; diff --git a/ios/Test/TestApp/AppDelegate.cs b/ios/Test/TestApp/AppDelegate.cs index ca60d9b..7e65c9b 100644 --- a/ios/Test/TestApp/AppDelegate.cs +++ b/ios/Test/TestApp/AppDelegate.cs @@ -10,9 +10,11 @@ namespace TestApp [Register("AppDelegate")] public class AppDelegate : UIApplicationDelegate { + private static readonly string IpAddress = "192.168.8.205"; public static readonly string TAG = "TestApp"; - public static readonly string BaseUrl = "http://192.168.9.228:8080"; - public static readonly string GdprUrl = "http://192.168.9.228:8080"; + public static readonly string BaseUrl = "http://" + IpAddress + ":9000"; + public static readonly string GdprUrl = "http://" + IpAddress + ":9000"; + public static readonly string ControlUrl = "ws://" + IpAddress + ":1987"; private AdjustCommandDelegate _commandDelegate = new CommandListener(); @@ -30,13 +32,10 @@ public override UIWindow Window public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { - _testLibrary = ATLTestLibrary.TestLibraryWithBaseUrl(BaseUrl, _commandDelegate); - + _testLibrary = ATLTestLibrary.TestLibraryWithBaseUrl(BaseUrl, ControlUrl, _commandDelegate); //_testLibrary.AddTestDirectory("current/event"); //_testLibrary.AddTest("current/event/Test_Event_Params"); - _testLibrary.StartTestSession(Adjust.SdkVersion); - return true; } diff --git a/ios/Test/TestLib/ApiDefinition.cs b/ios/Test/TestLib/ApiDefinition.cs index 2a19105..79f7909 100644 --- a/ios/Test/TestLib/ApiDefinition.cs +++ b/ios/Test/TestLib/ApiDefinition.cs @@ -18,8 +18,8 @@ interface AdjustCommandDelegate { [BaseType (typeof(NSObject))] interface ATLTestLibrary { - [Static, Export("testLibraryWithBaseUrl:andCommandDelegate:")] - ATLTestLibrary TestLibraryWithBaseUrl(string baseUrl, AdjustCommandDelegate commandDelegate); + [Static, Export("testLibraryWithBaseUrl:andControlUrl:andCommandDelegate:")] + ATLTestLibrary TestLibraryWithBaseUrl(string baseUrl, string controlUrl, AdjustCommandDelegate commandDelegate); [Export("addTest:")] void AddTest(string testName); diff --git a/ios/Test/TestLib/Resources/libAdjustTest.a b/ios/Test/TestLib/Resources/libAdjustTest.a index 985a134..4e41699 100644 Binary files a/ios/Test/TestLib/Resources/libAdjustTest.a and b/ios/Test/TestLib/Resources/libAdjustTest.a differ diff --git a/scripts/build_sdk_android.py b/scripts/build_sdk_android.py index 0943154..045e2be 100644 --- a/scripts/build_sdk_android.py +++ b/scripts/build_sdk_android.py @@ -43,16 +43,15 @@ def build(version, root_dir, android_submodule_dir, with_test_lib): # ------------------------------------------------------------------ # Test Library paths set_log_tag('ANROID-TEST-LIB-BUILD') - waiting_animation(duration=4.0, step=0.025) debug_green('Building Test Library started ...') test_jar_in_dir = '{0}/Adjust/test-library/build/libs'.format(sdk_adjust_dir) test_jar_out_dir = '{0}/android/Test/TestLib/Jars'.format(root_dir) # ------------------------------------------------------------------ # Running Gradle task: test-library:adjustMakeJarRelease ... - debug_green('Running Gradle task: test-library:adjustMakeJarRelease ...') + debug_green('Running Gradle task: test-library:adjustTestLibraryJarRelease ...') change_dir(project_dir) - gradle_run([':test-library:adjustMakeJarRelease']) + gradle_run([':test-library:adjustTestLibraryJarRelease']) # ------------------------------------------------------------------ # Moving the generated Android SDK JAR from jar in to jar out dir ... diff --git a/scripts/build_sdk_ios.py b/scripts/build_sdk_ios.py index c7c7409..f9157db 100644 --- a/scripts/build_sdk_ios.py +++ b/scripts/build_sdk_ios.py @@ -49,7 +49,6 @@ def build(version, root_dir, ios_submodule_dir, with_test_lib): # Test Library paths set_log_tag('IOS-TEST-LIB-BUILD') debug_green('Building Test Library started ...') - waiting_animation(duration=4.0, step=0.025) test_static_framework = '{0}/Frameworks/Static/AdjustTestLibrary.framework'.format(srcdir) test_lib_out_dir = '{0}/ios/Test/TestLib/Resources'.format(root_dir) diff --git a/scripts/scripting_utils.py b/scripts/scripting_utils.py index d8caf72..46359a3 100644 --- a/scripts/scripting_utils.py +++ b/scripts/scripting_utils.py @@ -138,10 +138,10 @@ def xcode_build(target, configuration='Release'): execute_command(['xcodebuild', '-target', target, '-configuration', configuration, 'clean', 'build', '-UseModernBuildSystem=NO']) def gradle_make_release_jar(): - execute_command(['./gradlew', 'adjustSdkNonNativeJarRelease']) + execute_command(['./gradlew', 'adjustCoreJarRelease']) def gradle_make_debug_jar(): - execute_command(['./gradlew', 'adjustSdkNonNativeJarDebug']) + execute_command(['./gradlew', 'adjustCoreJarDebug']) # https://stackoverflow.com/questions/17140886/how-to-search-and-replace-text-in-a-file-using-python def replace_text_in_file(file_path, substring, replace_with): @@ -169,23 +169,3 @@ def remove_file_if_exists(path): os.remove(path) else: debug('cannot delete {0}. file does not exist'.format(path)) - -############################################################ -### nonsense, eyecandy and such - -def waiting_animation(duration, step): - if(duration <= step): - return - - line = '-' - line_killer = '\b' - while duration >= 0: - duration -= step - sys.stdout.write(line) - sys.stdout.flush() - sys.stdout.write(line_killer) - line += '-' - line_killer += '\b' - if len(line) > 65: - line = '-' - time.sleep(step)