From 090b6023f8af4e5a5f1daddc50505592fb534c29 Mon Sep 17 00:00:00 2001 From: Shashank Suhane Date: Fri, 21 Aug 2020 14:55:33 +0200 Subject: [PATCH 1/8] Update version 4.23.0 --- README.md | 2 +- VERSION | 2 +- android/build.gradle | 2 +- ios/adjust_sdk.podspec | 4 ++-- lib/adjust.dart | 2 +- pubspec.yaml | 2 +- test/ios/test_lib.podspec | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 168ddba..77d2276 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ You can add Adjust SDK to your Flutter app by adding following to your `pubspec. ```yaml dependencies: - adjust_sdk: ^4.22.1 + adjust_sdk: ^4.23.0 ``` Then navigate to your project in the terminal and run: diff --git a/VERSION b/VERSION index 352b26a..58fe352 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.22.1 +4.23.0 diff --git a/android/build.gradle b/android/build.gradle index cf7fab1..680a75b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -36,5 +36,5 @@ android { } dependencies { - api 'com.adjust.sdk:adjust-android:4.22.0' + api 'com.adjust.sdk:adjust-android:4.24.0' } diff --git a/ios/adjust_sdk.podspec b/ios/adjust_sdk.podspec index 69ee45e..61dc12f 100644 --- a/ios/adjust_sdk.podspec +++ b/ios/adjust_sdk.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'adjust_sdk' - s.version = '4.22.1' + s.version = '4.23.0' s.summary = 'Adjust Flutter SDK for iOS platform' s.description = <<-DESC Adjust Flutter SDK for iOS platform. @@ -14,5 +14,5 @@ Pod::Spec.new do |s| s.ios.deployment_target = '8.0' s.dependency 'Flutter' - s.dependency 'Adjust', '4.22.1' + s.dependency 'Adjust', '4.23.0' end diff --git a/lib/adjust.dart b/lib/adjust.dart index 60bed2a..cffc4b7 100644 --- a/lib/adjust.dart +++ b/lib/adjust.dart @@ -17,7 +17,7 @@ import 'package:adjust_sdk/adjust_app_store_subscription.dart'; import 'package:adjust_sdk/adjust_play_store_subscription.dart'; class Adjust { - static const String _sdkPrefix = 'flutter4.22.1'; + static const String _sdkPrefix = 'flutter4.23.0'; static const MethodChannel _channel = const MethodChannel('com.adjust.sdk/api'); static void start(AdjustConfig config) { diff --git a/pubspec.yaml b/pubspec.yaml index 4edd94b..fb00568 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: adjust_sdk description: This is the Flutter SDK of Adjust™. You can read more about Adjust™ at adjust.com. author: Adjust GmbH homepage: https://github.com/adjust/flutter_sdk -version: 4.22.1 +version: 4.23.0 environment: sdk: ">=2.0.0 <3.0.0" diff --git a/test/ios/test_lib.podspec b/test/ios/test_lib.podspec index 3057616..d57f31a 100644 --- a/test/ios/test_lib.podspec +++ b/test/ios/test_lib.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'test_lib' - s.version = '4.22.1' + s.version = '4.23.0' s.summary = 'Adjust test library Flutter plugin' s.description = <<-DESC A new flutter plugin project. From bd0b3fab420f02c5976e8a3f268628aa0767dce9 Mon Sep 17 00:00:00 2001 From: Shashank Suhane Date: Fri, 21 Aug 2020 15:39:41 +0200 Subject: [PATCH 2/8] Update adjust config --- .../main/java/com/adjust/sdk/flutter/AdjustSdk.java | 13 +++++++++++++ ios/Classes/AdjustSdk.m | 6 ++++++ lib/adjust_config.dart | 8 ++++++++ test/app/lib/command_executor.dart | 9 +++++++++ 4 files changed, 36 insertions(+) diff --git a/android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java b/android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java index 87dc345..f6c9dca 100644 --- a/android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java +++ b/android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java @@ -413,6 +413,19 @@ public boolean launchReceivedDeeplink(Uri uri) { }); } + // Url strategy. + if (configMap.containsKey("urlStrategy")) { + String urlStrategy = (String) configMap.get("urlStrategy"); + adjustConfig.setUrlStrategy(urlStrategy); + } + + // Preinstall tracking. + if (configMap.containsKey("preinstallTrackingEnabled")) { + String strPreinstallTrackingEnabled = (String) configMap.get("preinstallTrackingEnabled"); + boolean preinstallTrackingEnabled = Boolean.valueOf(strPreinstallTrackingEnabled); + adjustConfig.setPreinstallTrackingEnabled(preinstallTrackingEnabled); + } + // Start SDK. Adjust.onCreate(adjustConfig); Adjust.onResume(); diff --git a/ios/Classes/AdjustSdk.m b/ios/Classes/AdjustSdk.m index bdafa77..4a79715 100644 --- a/ios/Classes/AdjustSdk.m +++ b/ios/Classes/AdjustSdk.m @@ -139,6 +139,7 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result { NSString *dartDeferredDeeplinkCallback = call.arguments[@"deferredDeeplinkCallback"]; BOOL allowSuppressLogLevel = NO; BOOL launchDeferredDeeplink = [call.arguments[@"launchDeferredDeeplink"] boolValue]; + NSString *urlStrategy = call.arguments[@"urlStrategy"]; // Suppress log level. if ([self isFieldValid:logLevel]) { @@ -238,6 +239,11 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result { andMethodChannel:self.channel]]; } + // Url strategy. + if ([self isFieldValid:urlStrategy]) { + [adjustConfig setUrlStrategy:urlStrategy]; + } + // Start SDK. [Adjust appDidLaunch:adjustConfig]; [Adjust trackSubsessionStart]; diff --git a/lib/adjust_config.dart b/lib/adjust_config.dart index 6f0e6f5..7a25bf2 100644 --- a/lib/adjust_config.dart +++ b/lib/adjust_config.dart @@ -59,6 +59,8 @@ class AdjustConfig { EventSuccessCallback eventSuccessCallback; EventFailureCallback eventFailureCallback; DeferredDeeplinkCallback deferredDeeplinkCallback; + String urlStrategy; + bool preinstallTrackingEnabled; AdjustConfig(this._appToken, this._environment) { _initCallbackHandlers(); @@ -197,6 +199,12 @@ class AdjustConfig { if (deferredDeeplinkCallback != null) { configMap['deferredDeeplinkCallback'] = _deferredDeeplinkCallbackName; } + if (urlStrategy != null) { + configMap['urlStrategy'] = urlStrategy; + } + if (preinstallTrackingEnabled != null) { + configMap['preinstallTrackingEnabled'] = preinstallTrackingEnabled.toString(); + } return configMap; } diff --git a/test/app/lib/command_executor.dart b/test/app/lib/command_executor.dart index f36c71a..6cec10a 100644 --- a/test/app/lib/command_executor.dart +++ b/test/app/lib/command_executor.dart @@ -331,6 +331,15 @@ class CommandExecutor { TestLib.sendInfoToServer(localBasePath); }; } + + if (_command.containsParameter('urlStrategy')) { + adjustConfig.urlStrategy = _command.getFirstParameterValue('urlStrategy'); + } + + if (_command.containsParameter('preinstallTrackingEnabled')) { + adjustConfig.preinstallTrackingEnabled = _command.getFirstParameterValue('preinstallTrackingEnabled') == 'true'; + } + } void _start() { From c9d1d72dad262fb39d11ac583abef02b33c2e6af Mon Sep 17 00:00:00 2001 From: Shashank Suhane Date: Fri, 21 Aug 2020 15:40:21 +0200 Subject: [PATCH 3/8] Update dependency versions --- example/android/app/build.gradle | 2 +- example/android/gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index c96c7f8..097421c 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -49,5 +49,5 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation 'com.google.android.gms:play-services-analytics:17.0.0' - implementation 'com.android.installreferrer:installreferrer:1.1.2' + implementation 'com.android.installreferrer:installreferrer:2.1' } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 3c8c454..e14a3df 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip From 35580aeba03f2d89b7c1d48b77d89b541f7b6051 Mon Sep 17 00:00:00 2001 From: Shashank Suhane Date: Fri, 21 Aug 2020 16:03:08 +0200 Subject: [PATCH 4/8] Update CHANGELOG --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index caf551e..72237ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +### Version 4.23.0 (TBD) +#### Added +- Added `setUrlStrategy` method in `AdjustConfig` to allow setting of URL strategy for specific market. + +#### Native SDKs +- [iOS@v4.23.0][ios_sdk_v4.23.0] +- [Android@v4.24.0][android_sdk_v4.24.0] + +--- + ### Version 4.22.1 (3rd August 2020) #### Changed - Changed referencing of native Android dependency from `implementation` to `api`. @@ -123,8 +133,10 @@ [ios_sdk_v4.18.3]: https://github.com/adjust/ios_sdk/tree/v4.18.3 [ios_sdk_v4.21.0]: https://github.com/adjust/ios_sdk/tree/v4.21.0 [ios_sdk_v4.22.1]: https://github.com/adjust/ios_sdk/tree/v4.22.1 +[ios_sdk_v4.23.0]: https://github.com/adjust/ios_sdk/tree/v4.23.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 [android_sdk_v4.21.0]: https://github.com/adjust/android_sdk/tree/v4.21.0 [android_sdk_v4.22.0]: https://github.com/adjust/android_sdk/tree/v4.22.0 +[android_sdk_v4.24.0]: https://github.com/adjust/android_sdk/tree/v4.24.0 \ No newline at end of file From ac392680a7fd05fbababb6c2e2a804eb62a5d684 Mon Sep 17 00:00:00 2001 From: ugi Date: Fri, 28 Aug 2020 14:00:24 +0200 Subject: [PATCH 5/8] add url strategy and ios 14 features to ios platform + example app recreation --- android/build.gradle | 2 +- .../com/adjust/sdk/flutter/AdjustSdk.java | 230 +++++++++-------- example/.gitignore | 44 +++- example/.metadata | 6 +- example/README.md | 16 +- example/android/.gitignore | 17 +- example/android/.project | 17 -- .../org.eclipse.buildship.core.prefs | 2 - example/android/app/.classpath | 6 - example/android/app/.project | 23 -- .../org.eclipse.buildship.core.prefs | 2 - example/android/app/build.gradle | 27 +- .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 53 ++-- .../com/adjust/examples/MainActivity.java | 29 --- .../com/adjust/examples/MainActivity.kt | 6 + .../app/src/main/res/values/styles.xml | 10 + .../app/src/profile/AndroidManifest.xml | 7 + example/android/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- example/android/settings.gradle | 18 +- example/ios/.gitignore | 64 ++--- example/ios/Flutter/AppFrameworkInfo.plist | 8 +- example/ios/Podfile | 72 ++---- example/ios/Podfile.lock | 28 +- example/ios/Runner.xcodeproj/project.pbxproj | 243 ++++++++++++------ .../WorkspaceSettings.xcsettings} | 6 +- .../xcshareddata/xcschemes/Runner.xcscheme | 4 +- .../xcshareddata/WorkspaceSettings.xcsettings | 4 +- example/ios/Runner/AppDelegate.h | 6 - example/ios/Runner/AppDelegate.m | 26 -- example/ios/Runner/AppDelegate.swift | 13 + .../Icon-App-1024x1024@1x.png | Bin 11112 -> 10932 bytes example/ios/Runner/Info.plist | 25 +- example/ios/Runner/Runner-Bridging-Header.h | 1 + example/ios/Runner/main.m | 9 - example/lib/main.dart | 78 ++++-- example/pubspec.yaml | 37 ++- example/test/widget_test.dart | 34 ++- ios/Classes/AdjustSdk.m | 18 +- lib/adjust.dart | 5 + lib/adjust_config.dart | 21 +- 42 files changed, 682 insertions(+), 548 deletions(-) delete mode 100644 example/android/.project delete mode 100644 example/android/.settings/org.eclipse.buildship.core.prefs delete mode 100644 example/android/app/.classpath delete mode 100644 example/android/app/.project delete mode 100644 example/android/app/.settings/org.eclipse.buildship.core.prefs create mode 100644 example/android/app/src/debug/AndroidManifest.xml delete mode 100644 example/android/app/src/main/java/com/adjust/examples/MainActivity.java create mode 100644 example/android/app/src/main/kotlin/com/adjust/examples/MainActivity.kt create mode 100644 example/android/app/src/profile/AndroidManifest.xml rename example/ios/{Runner/Runner.entitlements => Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings} (63%) delete mode 100644 example/ios/Runner/AppDelegate.h delete mode 100644 example/ios/Runner/AppDelegate.m create mode 100644 example/ios/Runner/AppDelegate.swift create mode 100644 example/ios/Runner/Runner-Bridging-Header.h delete mode 100644 example/ios/Runner/main.m diff --git a/android/build.gradle b/android/build.gradle index 680a75b..26c09b7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -7,7 +7,7 @@ buildscript { } dependencies { - classpath('com.android.tools.build:gradle:4.0.0') + classpath('com.android.tools.build:gradle:4.0.1') } } rootProject.allprojects { diff --git a/android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java b/android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java index f6c9dca..57ef463 100644 --- a/android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java +++ b/android/src/main/java/com/adjust/sdk/flutter/AdjustSdk.java @@ -150,6 +150,9 @@ public void onMethodCall(MethodCall call, final Result result) { case "trackPlayStoreSubscription": trackPlayStoreSubscription(call, result); break; + case "requestTrackingAuthorizationWithCompletionHandler": + requestTrackingAuthorizationWithCompletionHandler(result); + break; case "setTestOptions": setTestOptions(call, result); break; @@ -184,7 +187,7 @@ private void start(final MethodCall call, final Result result) { // Suppress log level. if (configMap.containsKey("logLevel")) { logLevel = (String) configMap.get("logLevel"); - if (logLevel.equals("suppress")) { + if (logLevel != null && logLevel.equals("suppress")) { isLogLevelSuppress = true; } } @@ -201,29 +204,38 @@ private void start(final MethodCall call, final Result result) { // Log level. if (configMap.containsKey("logLevel")) { logLevel = (String) configMap.get("logLevel"); - if (logLevel.equals("verbose")) { - adjustConfig.setLogLevel(LogLevel.VERBOSE); - } else if (logLevel.equals("debug")) { - adjustConfig.setLogLevel(LogLevel.DEBUG); - } else if (logLevel.equals("info")) { - adjustConfig.setLogLevel(LogLevel.INFO); - } else if (logLevel.equals("warn")) { - adjustConfig.setLogLevel(LogLevel.WARN); - } else if (logLevel.equals("error")) { - adjustConfig.setLogLevel(LogLevel.ERROR); - } else if (logLevel.equals("assert")) { - adjustConfig.setLogLevel(LogLevel.ASSERT); - } else if (logLevel.equals("suppress")) { - adjustConfig.setLogLevel(LogLevel.SUPRESS); - } else { - adjustConfig.setLogLevel(LogLevel.INFO); + if (logLevel != null) { + switch (logLevel) { + case "verbose": + adjustConfig.setLogLevel(LogLevel.VERBOSE); + break; + case "debug": + adjustConfig.setLogLevel(LogLevel.DEBUG); + break; + case "warn": + adjustConfig.setLogLevel(LogLevel.WARN); + break; + case "error": + adjustConfig.setLogLevel(LogLevel.ERROR); + break; + case "assert": + adjustConfig.setLogLevel(LogLevel.ASSERT); + break; + case "suppress": + adjustConfig.setLogLevel(LogLevel.SUPRESS); + break; + case "info": + default: + adjustConfig.setLogLevel(LogLevel.INFO); + break; + } } } // Event buffering. if (configMap.containsKey("eventBufferingEnabled")) { String eventBufferingEnabledString = (String) configMap.get("eventBufferingEnabled"); - boolean eventBufferingEnabled = Boolean.valueOf(eventBufferingEnabledString); + boolean eventBufferingEnabled = Boolean.parseBoolean(eventBufferingEnabledString); adjustConfig.setEventBufferingEnabled(eventBufferingEnabled); } @@ -254,14 +266,14 @@ private void start(final MethodCall call, final Result result) { // Background tracking. if (configMap.containsKey("sendInBackground")) { String strSendInBackground = (String) configMap.get("sendInBackground"); - boolean sendInBackground = Boolean.valueOf(strSendInBackground); + boolean sendInBackground = Boolean.parseBoolean(strSendInBackground); adjustConfig.setSendInBackground(sendInBackground); } // Set device known. if (configMap.containsKey("isDeviceKnown")) { String strIsDeviceKnown = (String) configMap.get("isDeviceKnown"); - boolean isDeviceKnown = Boolean.valueOf(strIsDeviceKnown); + boolean isDeviceKnown = Boolean.parseBoolean(strIsDeviceKnown); adjustConfig.setDeviceKnown(isDeviceKnown); } @@ -269,7 +281,7 @@ private void start(final MethodCall call, final Result result) { if (configMap.containsKey("delayStart")) { String strDelayStart = (String) configMap.get("delayStart"); if (isNumber(strDelayStart)) { - double delayStart = Double.valueOf(strDelayStart); + double delayStart = Double.parseDouble(strDelayStart); adjustConfig.setDelayStart(delayStart); } } @@ -298,119 +310,131 @@ private void start(final MethodCall call, final Result result) { // Launch deferred deep link. if (configMap.containsKey("launchDeferredDeeplink")) { String strLaunchDeferredDeeplink = (String) configMap.get("launchDeferredDeeplink"); - this.launchDeferredDeeplink = strLaunchDeferredDeeplink.equals("true"); + launchDeferredDeeplink = strLaunchDeferredDeeplink.equals("true"); } // Attribution callback. if (configMap.containsKey("attributionCallback")) { final String dartMethodName = (String) configMap.get("attributionCallback"); - adjustConfig.setOnAttributionChangedListener(new OnAttributionChangedListener() { - @Override - public void onAttributionChanged(AdjustAttribution adjustAttribution) { - HashMap adjustAttributionMap = new HashMap(); - adjustAttributionMap.put("trackerToken", adjustAttribution.trackerToken); - adjustAttributionMap.put("trackerName", adjustAttribution.trackerName); - adjustAttributionMap.put("network", adjustAttribution.network); - adjustAttributionMap.put("campaign", adjustAttribution.campaign); - adjustAttributionMap.put("adgroup", adjustAttribution.adgroup); - adjustAttributionMap.put("creative", adjustAttribution.creative); - adjustAttributionMap.put("clickLabel", adjustAttribution.clickLabel); - adjustAttributionMap.put("adid", adjustAttribution.adid); - channel.invokeMethod(dartMethodName, adjustAttributionMap); - } - }); + if (dartMethodName != null) { + adjustConfig.setOnAttributionChangedListener(new OnAttributionChangedListener() { + @Override + public void onAttributionChanged(AdjustAttribution adjustAttribution) { + HashMap adjustAttributionMap = new HashMap(); + adjustAttributionMap.put("trackerToken", adjustAttribution.trackerToken); + adjustAttributionMap.put("trackerName", adjustAttribution.trackerName); + adjustAttributionMap.put("network", adjustAttribution.network); + adjustAttributionMap.put("campaign", adjustAttribution.campaign); + adjustAttributionMap.put("adgroup", adjustAttribution.adgroup); + adjustAttributionMap.put("creative", adjustAttribution.creative); + adjustAttributionMap.put("clickLabel", adjustAttribution.clickLabel); + adjustAttributionMap.put("adid", adjustAttribution.adid); + channel.invokeMethod(dartMethodName, adjustAttributionMap); + } + }); + } } // Session success callback. if (configMap.containsKey("sessionSuccessCallback")) { final String dartMethodName = (String) configMap.get("sessionSuccessCallback"); - adjustConfig.setOnSessionTrackingSucceededListener(new OnSessionTrackingSucceededListener() { - @Override - public void onFinishedSessionTrackingSucceeded(AdjustSessionSuccess adjustSessionSuccess) { - HashMap adjustSessionSuccessMap = new HashMap(); - adjustSessionSuccessMap.put("message", adjustSessionSuccess.message); - adjustSessionSuccessMap.put("timestamp", adjustSessionSuccess.timestamp); - adjustSessionSuccessMap.put("adid", adjustSessionSuccess.adid); - if (adjustSessionSuccess.jsonResponse != null) { - adjustSessionSuccessMap.put("jsonResponse", adjustSessionSuccess.jsonResponse.toString()); + if (dartMethodName != null) { + adjustConfig.setOnSessionTrackingSucceededListener(new OnSessionTrackingSucceededListener() { + @Override + public void onFinishedSessionTrackingSucceeded(AdjustSessionSuccess adjustSessionSuccess) { + HashMap adjustSessionSuccessMap = new HashMap(); + adjustSessionSuccessMap.put("message", adjustSessionSuccess.message); + adjustSessionSuccessMap.put("timestamp", adjustSessionSuccess.timestamp); + adjustSessionSuccessMap.put("adid", adjustSessionSuccess.adid); + if (adjustSessionSuccess.jsonResponse != null) { + adjustSessionSuccessMap.put("jsonResponse", adjustSessionSuccess.jsonResponse.toString()); + } + channel.invokeMethod(dartMethodName, adjustSessionSuccessMap); } - channel.invokeMethod(dartMethodName, adjustSessionSuccessMap); - } - }); + }); + } } // Session failure callback. if (configMap.containsKey("sessionFailureCallback")) { final String dartMethodName = (String) configMap.get("sessionFailureCallback"); - adjustConfig.setOnSessionTrackingFailedListener(new OnSessionTrackingFailedListener() { - @Override - public void onFinishedSessionTrackingFailed(AdjustSessionFailure adjustSessionFailure) { - HashMap adjustSessionFailureMap = new HashMap(); - adjustSessionFailureMap.put("message", adjustSessionFailure.message); - adjustSessionFailureMap.put("timestamp", adjustSessionFailure.timestamp); - adjustSessionFailureMap.put("adid", adjustSessionFailure.adid); - adjustSessionFailureMap.put("willRetry", Boolean.toString(adjustSessionFailure.willRetry)); - if (adjustSessionFailure.jsonResponse != null) { - adjustSessionFailureMap.put("jsonResponse", adjustSessionFailure.jsonResponse.toString()); + if (dartMethodName != null) { + adjustConfig.setOnSessionTrackingFailedListener(new OnSessionTrackingFailedListener() { + @Override + public void onFinishedSessionTrackingFailed(AdjustSessionFailure adjustSessionFailure) { + HashMap adjustSessionFailureMap = new HashMap(); + adjustSessionFailureMap.put("message", adjustSessionFailure.message); + adjustSessionFailureMap.put("timestamp", adjustSessionFailure.timestamp); + adjustSessionFailureMap.put("adid", adjustSessionFailure.adid); + adjustSessionFailureMap.put("willRetry", Boolean.toString(adjustSessionFailure.willRetry)); + if (adjustSessionFailure.jsonResponse != null) { + adjustSessionFailureMap.put("jsonResponse", adjustSessionFailure.jsonResponse.toString()); + } + channel.invokeMethod(dartMethodName, adjustSessionFailureMap); } - channel.invokeMethod(dartMethodName, adjustSessionFailureMap); - } - }); + }); + } } // Event success callback. if (configMap.containsKey("eventSuccessCallback")) { final String dartMethodName = (String) configMap.get("eventSuccessCallback"); - adjustConfig.setOnEventTrackingSucceededListener(new OnEventTrackingSucceededListener() { - @Override - public void onFinishedEventTrackingSucceeded(AdjustEventSuccess adjustEventSuccess) { - HashMap adjustEventSuccessMap = new HashMap(); - adjustEventSuccessMap.put("message", adjustEventSuccess.message); - adjustEventSuccessMap.put("timestamp", adjustEventSuccess.timestamp); - adjustEventSuccessMap.put("adid", adjustEventSuccess.adid); - adjustEventSuccessMap.put("eventToken", adjustEventSuccess.eventToken); - adjustEventSuccessMap.put("callbackId", adjustEventSuccess.callbackId); - if (adjustEventSuccess.jsonResponse != null) { - adjustEventSuccessMap.put("jsonResponse", adjustEventSuccess.jsonResponse.toString()); + if (dartMethodName != null) { + adjustConfig.setOnEventTrackingSucceededListener(new OnEventTrackingSucceededListener() { + @Override + public void onFinishedEventTrackingSucceeded(AdjustEventSuccess adjustEventSuccess) { + HashMap adjustEventSuccessMap = new HashMap(); + adjustEventSuccessMap.put("message", adjustEventSuccess.message); + adjustEventSuccessMap.put("timestamp", adjustEventSuccess.timestamp); + adjustEventSuccessMap.put("adid", adjustEventSuccess.adid); + adjustEventSuccessMap.put("eventToken", adjustEventSuccess.eventToken); + adjustEventSuccessMap.put("callbackId", adjustEventSuccess.callbackId); + if (adjustEventSuccess.jsonResponse != null) { + adjustEventSuccessMap.put("jsonResponse", adjustEventSuccess.jsonResponse.toString()); + } + channel.invokeMethod(dartMethodName, adjustEventSuccessMap); } - channel.invokeMethod(dartMethodName, adjustEventSuccessMap); - } - }); + }); + } } // Event failure callback. if (configMap.containsKey("eventFailureCallback")) { final String dartMethodName = (String) configMap.get("eventFailureCallback"); - adjustConfig.setOnEventTrackingFailedListener(new OnEventTrackingFailedListener() { - @Override - public void onFinishedEventTrackingFailed(AdjustEventFailure adjustEventFailure) { - HashMap adjustEventFailureMap = new HashMap(); - adjustEventFailureMap.put("message", adjustEventFailure.message); - adjustEventFailureMap.put("timestamp", adjustEventFailure.timestamp); - adjustEventFailureMap.put("adid", adjustEventFailure.adid); - adjustEventFailureMap.put("eventToken", adjustEventFailure.eventToken); - adjustEventFailureMap.put("callbackId", adjustEventFailure.callbackId); - adjustEventFailureMap.put("willRetry", Boolean.toString(adjustEventFailure.willRetry)); - if (adjustEventFailure.jsonResponse != null) { - adjustEventFailureMap.put("jsonResponse", adjustEventFailure.jsonResponse.toString()); + if (dartMethodName != null) { + adjustConfig.setOnEventTrackingFailedListener(new OnEventTrackingFailedListener() { + @Override + public void onFinishedEventTrackingFailed(AdjustEventFailure adjustEventFailure) { + HashMap adjustEventFailureMap = new HashMap(); + adjustEventFailureMap.put("message", adjustEventFailure.message); + adjustEventFailureMap.put("timestamp", adjustEventFailure.timestamp); + adjustEventFailureMap.put("adid", adjustEventFailure.adid); + adjustEventFailureMap.put("eventToken", adjustEventFailure.eventToken); + adjustEventFailureMap.put("callbackId", adjustEventFailure.callbackId); + adjustEventFailureMap.put("willRetry", Boolean.toString(adjustEventFailure.willRetry)); + if (adjustEventFailure.jsonResponse != null) { + adjustEventFailureMap.put("jsonResponse", adjustEventFailure.jsonResponse.toString()); + } + channel.invokeMethod(dartMethodName, adjustEventFailureMap); } - channel.invokeMethod(dartMethodName, adjustEventFailureMap); - } - }); + }); + } } // Deferred deep link callback. if (configMap.containsKey("deferredDeeplinkCallback")) { final String dartMethodName = (String) configMap.get("deferredDeeplinkCallback"); - adjustConfig.setOnDeeplinkResponseListener(new OnDeeplinkResponseListener() { - @Override - public boolean launchReceivedDeeplink(Uri uri) { - HashMap uriParamsMap = new HashMap(); - uriParamsMap.put("uri", uri.toString()); - channel.invokeMethod(dartMethodName, uriParamsMap); - return launchDeferredDeeplink; - } - }); + if (dartMethodName != null) { + adjustConfig.setOnDeeplinkResponseListener(new OnDeeplinkResponseListener() { + @Override + public boolean launchReceivedDeeplink(Uri uri) { + HashMap uriParamsMap = new HashMap(); + uriParamsMap.put("uri", uri.toString()); + channel.invokeMethod(dartMethodName, uriParamsMap); + return launchDeferredDeeplink; + } + }); + } } // Url strategy. @@ -422,7 +446,7 @@ public boolean launchReceivedDeeplink(Uri uri) { // Preinstall tracking. if (configMap.containsKey("preinstallTrackingEnabled")) { String strPreinstallTrackingEnabled = (String) configMap.get("preinstallTrackingEnabled"); - boolean preinstallTrackingEnabled = Boolean.valueOf(strPreinstallTrackingEnabled); + boolean preinstallTrackingEnabled = Boolean.parseBoolean(strPreinstallTrackingEnabled); adjustConfig.setPreinstallTrackingEnabled(preinstallTrackingEnabled); } @@ -802,6 +826,10 @@ private void trackPlayStoreSubscription(final MethodCall call, final Result resu result.success(null); } + private void requestTrackingAuthorizationWithCompletionHandler(final Result result) { + result.error("0", "Error. No requestTrackingAuthorizationWithCompletionHandler for Android plaftorm!", null); + } + private void setTestOptions(final MethodCall call, final Result result) { AdjustTestOptions testOptions = new AdjustTestOptions(); Map testOptionsMap = (Map) call.arguments; diff --git a/example/.gitignore b/example/.gitignore index 053f45a..9d532b1 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -1,13 +1,41 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp .DS_Store .atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id .dart_tool/ -.idea -.vscode/ -.packages -.pub/ -build/ -ios/.generated/ -packages .flutter-plugins .flutter-plugins-dependencies -ios/Flutter/flutter_export_environment.sh +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json diff --git a/example/.metadata b/example/.metadata index 3c0dd2c..c7645f4 100644 --- a/example/.metadata +++ b/example/.metadata @@ -4,5 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: b397406561f5e7a9c94e28f58d9e49fca0dd58b7 - channel: beta + revision: cad4d1333eb70e66fe8e993b10fa09306a48269d + channel: master + +project_type: app diff --git a/example/README.md b/example/README.md index fd91a55..6a4e0e3 100644 --- a/example/README.md +++ b/example/README.md @@ -1,8 +1,16 @@ -# adjust_sdk_example +# example -Demonstrates how to use the Adjust Flutter SDK plugin. +Adjust Flutter Appliaction ## Getting Started -For help getting started with Flutter, view our online -[documentation](https://flutter.io/). +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/example/android/.gitignore b/example/android/.gitignore index 65b7315..0a741cb 100644 --- a/example/android/.gitignore +++ b/example/android/.gitignore @@ -1,10 +1,11 @@ -*.iml -*.class -.gradle +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat /local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties diff --git a/example/android/.project b/example/android/.project deleted file mode 100644 index 3964dd3..0000000 --- a/example/android/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - android - Project android created by Buildship. - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/example/android/.settings/org.eclipse.buildship.core.prefs b/example/android/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index e889521..0000000 --- a/example/android/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -connection.project.dir= -eclipse.preferences.version=1 diff --git a/example/android/app/.classpath b/example/android/app/.classpath deleted file mode 100644 index 8d8d85f..0000000 --- a/example/android/app/.classpath +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/example/android/app/.project b/example/android/app/.project deleted file mode 100644 index ac485d7..0000000 --- a/example/android/app/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - app - Project app created by Buildship. - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.buildship.core.gradleprojectbuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.buildship.core.gradleprojectnature - - diff --git a/example/android/app/.settings/org.eclipse.buildship.core.prefs b/example/android/app/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index 1202db2..0000000 --- a/example/android/app/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1,2 +0,0 @@ -#Wed May 16 11:59:35 CEST 2018 -connection.project.dir=.. diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 097421c..854055e 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -11,14 +11,30 @@ if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion 29 + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + lintOptions { disable 'InvalidPackage' + checkReleaseBuilds false } defaultConfig { @@ -26,9 +42,8 @@ android { applicationId "com.adjust.examples" minSdkVersion 16 targetSdkVersion 29 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName } buildTypes { @@ -45,9 +60,5 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - implementation 'com.google.android.gms:play-services-analytics:17.0.0' - implementation 'com.android.installreferrer:installreferrer:2.1' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..15de6bd --- /dev/null +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index 5b45893..54c4ce3 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -1,14 +1,5 @@ - - - - - - - + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> + + - - - - - - - - - - - + + diff --git a/example/android/app/src/main/java/com/adjust/examples/MainActivity.java b/example/android/app/src/main/java/com/adjust/examples/MainActivity.java deleted file mode 100644 index 662ddfa..0000000 --- a/example/android/app/src/main/java/com/adjust/examples/MainActivity.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.adjust.examples; - -import android.os.Bundle; -import android.content.Intent; -import android.net.Uri; - -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -import com.adjust.sdk.flutter.AdjustSdk; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - - Intent intent = getIntent(); - Uri data = intent.getData(); - AdjustSdk.appWillOpenUrl(data, this); - } - - @Override - protected void onNewIntent(Intent intent) { - super.onNewIntent(intent); - Uri data = intent.getData(); - AdjustSdk.appWillOpenUrl(data, this); - } -} diff --git a/example/android/app/src/main/kotlin/com/adjust/examples/MainActivity.kt b/example/android/app/src/main/kotlin/com/adjust/examples/MainActivity.kt new file mode 100644 index 0000000..96ef5a2 --- /dev/null +++ b/example/android/app/src/main/kotlin/com/adjust/examples/MainActivity.kt @@ -0,0 +1,6 @@ +package com.adjust.examples + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml index 00fa441..1f83a33 100644 --- a/example/android/app/src/main/res/values/styles.xml +++ b/example/android/app/src/main/res/values/styles.xml @@ -1,8 +1,18 @@ + + + diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..15de6bd --- /dev/null +++ b/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/example/android/build.gradle b/example/android/build.gradle index 6856ad5..dc5cdbc 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -1,11 +1,13 @@ buildscript { + ext.kotlin_version = '1.3.50' repositories { google() jcenter() } dependencies { - classpath('com.android.tools.build:gradle:4.0.0') + classpath 'com.android.tools.build:gradle:4.0.1' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index e14a3df..7fe1b1a 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,4 +1,4 @@ -#Tue Mar 24 22:49:54 CET 2020 +#Fri Aug 28 12:41:30 CEST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 5a2f14f..44e62bc 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -1,15 +1,11 @@ include ':app' -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/example/ios/.gitignore b/example/ios/.gitignore index 2a8c8b6..e96ef60 100644 --- a/example/ios/.gitignore +++ b/example/ios/.gitignore @@ -1,44 +1,32 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser *.mode1v3 *.mode2v3 +*.moved-aside +*.pbxuser *.perspectivev3 - -!default.pbxuser +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. !default.mode1v3 !default.mode2v3 +!default.pbxuser !default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/app.flx -/Flutter/app.zip -/Flutter/flutter_assets/ -/Flutter/App.framework -/Flutter/Flutter.framework -/Flutter/Generated.xcconfig -/ServiceDefinitions.json - -Pods/ diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 6c2de80..f2872cf 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable App CFBundleIdentifier @@ -20,11 +20,7 @@ ???? CFBundleVersion 1.0 - UIRequiredDeviceCapabilities - - arm64 - MinimumOSVersion - 8.0 + 9.0 diff --git a/example/ios/Podfile b/example/ios/Podfile index dc1da60..1e8c3c9 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -4,60 +4,38 @@ # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' -def parse_KV_file(file, separator='=') - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return []; +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches end - pods_ary = [] - skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) { |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - pods_ary.push({:name => podname, :path => podpath}); - else - puts "Invalid plugin specification: #{line}" - end - } - return pods_ary + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + target 'Runner' do - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - system('rm -rf Pods/.symlinks') - system('mkdir -p Pods/.symlinks/plugins') - - # Flutter Pods - generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') - if generated_xcode_build_settings.empty? - puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." - end - generated_xcode_build_settings.map { |p| - if p[:name] == 'FLUTTER_FRAMEWORK_DIR' - symlink = File.join('Pods', '.symlinks', 'flutter') - File.symlink(File.dirname(p[:path]), symlink) - pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) - end - } - - # Plugin Pods - plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.map { |p| - symlink = File.join('Pods', '.symlinks', 'plugins', p[:name]) - File.symlink(p[:path], symlink) - pod p[:name], :path => File.join(symlink, 'ios') - } + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end post_install do |installer| installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - end + flutter_additional_ios_build_settings(target) end end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index f62e10e..d5d77d7 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,31 +1,31 @@ PODS: - - Adjust (4.18.3): - - Adjust/Core (= 4.18.3) - - Adjust/Core (4.18.3) - - adjust_sdk (4.18.1): - - Adjust (~> 4.18.3) + - Adjust (4.23.0): + - Adjust/Core (= 4.23.0) + - Adjust/Core (4.23.0) + - adjust_sdk (4.23.0): + - Adjust (= 4.23.0) - Flutter - Flutter (1.0.0) DEPENDENCIES: - - adjust_sdk (from `Pods/.symlinks/plugins/adjust_sdk/ios`) - - Flutter (from `Pods/.symlinks/flutter/ios`) + - adjust_sdk (from `.symlinks/plugins/adjust_sdk/ios`) + - Flutter (from `Flutter`) SPEC REPOS: - https://github.com/cocoapods/specs.git: + trunk: - Adjust EXTERNAL SOURCES: adjust_sdk: - :path: Pods/.symlinks/plugins/adjust_sdk/ios + :path: ".symlinks/plugins/adjust_sdk/ios" Flutter: - :path: Pods/.symlinks/flutter/ios + :path: Flutter SPEC CHECKSUMS: - Adjust: fef133f0bf610d439953b50306372c68c625d7e9 - adjust_sdk: 16e632342b0ef7a1b847e2da7779e93fda3a1449 + Adjust: 552e4f9bbc77501b2000f483491b20642081749a + adjust_sdk: 66801d7bb9e2b5a7fa23eeeb248faca5b821aab3 Flutter: 0e3d915762c693b495b44d77113d4970485de6ec -PODFILE CHECKSUM: 13dcf421f4da2e937a57e8ba760ed880beae536f +PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c -COCOAPODS: 1.7.4 +COCOAPODS: 1.9.3 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 8c40f96..43bb3fa 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,22 +3,22 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 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 */; }; - D0410D87E865773E05FA9472 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C27616AEBB6B5DC1DE05B3B /* libPods-Runner.a */; }; + 9DF8055B24F9214500A001CE /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DF8055A24F9214500A001CE /* iAd.framework */; }; + 9DF8055D24F9214A00A001CE /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DF8055C24F9214900A001CE /* AdSupport.framework */; }; + 9DF8055F24F9215100A001CE /* AppTrackingTransparency.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DF8055E24F9215100A001CE /* AppTrackingTransparency.framework */; }; + 9DF8056124F9215600A001CE /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DF8056024F9215600A001CE /* StoreKit.framework */; }; + 9DF8056324F9215B00A001CE /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DF8056224F9215B00A001CE /* CoreTelephony.framework */; }; + B6025B3595AA1F9CF9F139AC /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 356E070BF8DE437AF960ADE2 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -28,8 +28,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -39,24 +37,26 @@ /* Begin PBXFileReference section */ 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 = ""; }; + 33F9C572C86811AA0C86097B /* 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 = ""; }; + 356E070BF8DE437AF960ADE2 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; - 5AA730268CE76F51DB29789A /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 5C27616AEBB6B5DC1DE05B3B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5F31F7FF83E0ADA732B55E3B /* 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 = ""; }; + 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 = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; 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 = ""; }; - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 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 = ""; }; - 9D47743B21B55A72006CDE86 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; - BD0852E93C31E6223A6F6A61 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 9DF8055A24F9214500A001CE /* iAd.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iAd.framework; path = System/Library/Frameworks/iAd.framework; sourceTree = SDKROOT; }; + 9DF8055C24F9214900A001CE /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; + 9DF8055E24F9215100A001CE /* AppTrackingTransparency.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppTrackingTransparency.framework; path = System/Library/Frameworks/AppTrackingTransparency.framework; sourceTree = SDKROOT; }; + 9DF8056024F9215600A001CE /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; + 9DF8056224F9215B00A001CE /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; + E1131B9CA4E134D6F01B8E27 /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -64,38 +64,33 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, - D0410D87E865773E05FA9472 /* libPods-Runner.a in Frameworks */, + 9DF8055F24F9215100A001CE /* AppTrackingTransparency.framework in Frameworks */, + 9DF8055B24F9214500A001CE /* iAd.framework in Frameworks */, + 9DF8056324F9215B00A001CE /* CoreTelephony.framework in Frameworks */, + 9DF8055D24F9214A00A001CE /* AdSupport.framework in Frameworks */, + 9DF8056124F9215600A001CE /* StoreKit.framework in Frameworks */, + B6025B3595AA1F9CF9F139AC /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 3507F484585A3BF54D5A1822 /* Frameworks */ = { + 19C31DF7D5B6DFB9032481D8 /* Pods */ = { isa = PBXGroup; children = ( - 5C27616AEBB6B5DC1DE05B3B /* libPods-Runner.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 593A698012D377528BF34DC3 /* Pods */ = { - isa = PBXGroup; - children = ( - BD0852E93C31E6223A6F6A61 /* Pods-Runner.debug.xcconfig */, - 5AA730268CE76F51DB29789A /* Pods-Runner.release.xcconfig */, + E1131B9CA4E134D6F01B8E27 /* Pods-Runner.debug.xcconfig */, + 5F31F7FF83E0ADA732B55E3B /* Pods-Runner.release.xcconfig */, + 33F9C572C86811AA0C86097B /* Pods-Runner.profile.xcconfig */, ); name = Pods; + path = Pods; sourceTree = ""; }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -109,8 +104,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 593A698012D377528BF34DC3 /* Pods */, - 3507F484585A3BF54D5A1822 /* Frameworks */, + 9DF8055924F9214500A001CE /* Frameworks */, + 19C31DF7D5B6DFB9032481D8 /* Pods */, ); sourceTree = ""; }; @@ -125,26 +120,29 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( - 9D47743B21B55A72006CDE86 /* Runner.entitlements */, - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 97C146FA1CF9000F007C117D /* Main.storyboard */, 97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, ); path = Runner; sourceTree = ""; }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { + 9DF8055924F9214500A001CE /* Frameworks */ = { isa = PBXGroup; children = ( - 97C146F21CF9000F007C117D /* main.m */, + 9DF8056224F9215B00A001CE /* CoreTelephony.framework */, + 9DF8056024F9215600A001CE /* StoreKit.framework */, + 9DF8055E24F9215100A001CE /* AppTrackingTransparency.framework */, + 9DF8055C24F9214900A001CE /* AdSupport.framework */, + 9DF8055A24F9214500A001CE /* iAd.framework */, + 356E070BF8DE437AF960ADE2 /* Pods_Runner.framework */, ); - name = "Supporting Files"; + name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ @@ -154,14 +152,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 83729BD56D81B39A4B618AF5 /* [CP] Check Pods Manifest.lock */, + 432950737933D1855DAFE804 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 8EB7958AB4C13BF68C5A0032 /* [CP] Embed Pods Frameworks */, + 8CC0374ACA4499C045686AA1 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -178,23 +176,18 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1010; - ORGANIZATIONNAME = "The Chromium Authors"; + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = QGUGW9AUMK; - SystemCapabilities = { - com.apple.SafariKeychain = { - enabled = 1; - }; - }; + LastSwiftMigration = 1100; }; }; }; buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -237,18 +230,22 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 83729BD56D81B39A4B618AF5 /* [CP] Check Pods Manifest.lock */ = { + 432950737933D1855DAFE804 /* [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", ); @@ -257,18 +254,17 @@ 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; }; - 8EB7958AB4C13BF68C5A0032 /* [CP] Embed Pods Frameworks */ = { + 8CC0374ACA4499C045686AA1 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_ROOT}/.symlinks/flutter/ios/Flutter.framework", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -296,8 +292,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -324,9 +319,88 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = QGUGW9AUMK; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -372,7 +446,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -382,7 +456,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -422,9 +495,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -435,8 +511,8 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 1; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = QGUGW9AUMK; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -444,14 +520,19 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -461,8 +542,8 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 1; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = QGUGW9AUMK; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -470,14 +551,18 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; @@ -490,6 +575,7 @@ buildConfigurations = ( 97C147031CF9000F007C117D /* Debug */, 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -499,6 +585,7 @@ buildConfigurations = ( 97C147061CF9000F007C117D /* Debug */, 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/example/ios/Runner/Runner.entitlements b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 63% rename from example/ios/Runner/Runner.entitlements rename to example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings index c7476a3..f9b0d7c 100644 --- a/example/ios/Runner/Runner.entitlements +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -2,9 +2,7 @@ - com.apple.developer.associated-domains - - applinks:f6wc.adj.st - + PreviewsEnabled + diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index e4f93ed..a28140c 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ - BuildSystemType - Original + PreviewsEnabled + diff --git a/example/ios/Runner/AppDelegate.h b/example/ios/Runner/AppDelegate.h deleted file mode 100644 index cf210d2..0000000 --- a/example/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m deleted file mode 100644 index d47f42d..0000000 --- a/example/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,26 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" -#import "Adjust.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { - [Adjust appWillOpenUrl:url]; - return YES; -} - -- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray> *restorableObjects))restorationHandler { - if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) { - [Adjust appWillOpenUrl:[userActivity webpageURL]]; - } - - return YES; -} - -@end diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index 3d43d11e66f4de3da27ed045ca4fe38ad8b48094..dc9ada4725e9b0ddb1deab583e5b5102493aa332 100644 GIT binary patch liter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`SRerO!h}!cS%SMC<)tGix zOzVP^_t!HN&HIPL-ZpcgWitHM&yFRC7!k4zSI+-<_uQ}|tX)n{Ib;X>Xx>i_d*KkH zCzogKQFpP1408_2!ofU|iBq2R8hW6G zuqJs9Tyw{u%-uWczPLkM!MfKfflt+NK9Vk8E!C>AsJwNDRoe2~cL+UvqNP|5J8t)( z0$iMa!jhudJ+fqFn+um&@Oj6qXJd_3-l`S^I1#0fnt!z3?D*hAHr*u(*wR@`4O z#avrtg%s`Fh{?$FtBFM^$@@hW!8ZfF4;=n0<8In&X}-Rp=cd0TqT_ne46$j^r}FzE z26vX^!PzScuQfFfl1HEZ{zL?G88mcc76zHGizWiykBf4m83Z${So-+dZ~YGhm*RO7 zB1gdIdqnFi?qw+lPRFW5?}CQ3Me3G^muvll&4iN+*5#_mmIu;loULMwb4lu9U*dFM z-Sr**(0Ei~u=$3<6>C-G6z4_LNCx||6YtjS)<;hf)YJTPKXW+w%hhCTUAInIse9>r zl2YU6nRb$u-FJlWN*{{%sm_gi_UP5{=?5}5^D2vPzM=oPfNw~azZQ#P zl5z8RtSSiTIpEohC15i-Q1Bk{3&ElsD0uGAOxvbk29VUDmmA0w;^v`W#0`};O3DVE z&+-ca*`YcN%z*#VXWK9Qa-OEME#fykF%|7o=1Y+eF;Rtv0W4~kKRDx9YBHOWhC%^I z$Jec0cC7o37}Xt}cu)NH5R}NT+=2Nap*`^%O)vz?+{PV<2~qX%TzdJOGeKj5_QjqR&a3*K@= P-1+_A+?hGkL;m(J7kc&K diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index eaa90a0..a9674a8 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -11,36 +11,21 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - adjust_sdk_example + example CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + $(FLUTTER_BUILD_NAME) CFBundleSignature ???? - CFBundleURLTypes - - - CFBundleURLName - com.adjust.examples - CFBundleURLSchemes - - adjust-example - - - CFBundleVersion - 1 + $(FLUTTER_BUILD_NUMBER) LSRequiresIPhoneOS UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main - UIRequiredDeviceCapabilities - - arm64 - UISupportedInterfaceOrientations UIInterfaceOrientationPortrait @@ -54,6 +39,8 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + NSUserTrackingUsageDescription + We will we will track you (clap clap stomp) UIViewControllerBasedStatusBarAppearance diff --git a/example/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/example/ios/Runner/main.m b/example/ios/Runner/main.m deleted file mode 100644 index 0ccc450..0000000 --- a/example/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/example/lib/main.dart b/example/lib/main.dart index f625b14..e642702 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -11,25 +11,55 @@ import 'package:adjust_sdk/adjust_session_success.dart'; import 'util.dart'; void main() { - runApp(new AdjustExampleApp()); + runApp(MyApp()); } -class AdjustExampleApp extends StatelessWidget { +class MyApp extends StatelessWidget { + // This widget is the root of your application. @override Widget build(BuildContext context) { - return new MaterialApp( - title: 'Adjust Flutter Example App', - home: new MainScreen(), + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + // This is the theme of your application. + // + // Try running your application with "flutter run". You'll see the + // application has a blue toolbar. Then, without quitting the app, try + // changing the primarySwatch below to Colors.green and then invoke + // "hot reload" (press "r" in the console where you ran "flutter run", + // or simply save your changes to "hot reload" in a Flutter IDE). + // Notice that the counter didn't reset back to zero; the application + // is not restarted. + primarySwatch: Colors.blue, + // This makes the visual density adapt to the platform that you run + // the app on. For desktop platforms, the controls will be smaller and + // closer together (more dense) than on mobile platforms. + visualDensity: VisualDensity.adaptivePlatformDensity, + ), + home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } -class MainScreen extends StatefulWidget { +class MyHomePage extends StatefulWidget { + MyHomePage({Key key, this.title}) : super(key: key); + + // This widget is the home page of your application. It is stateful, meaning + // that it has a State object (defined below) that contains fields that affect + // how it looks. + + // This class is the configuration for the state. It holds the values (in this + // case the title) provided by the parent (in this case the App widget) and + // used by the build method of the State. Fields in a Widget subclass are + // always marked "final". + + final String title; + @override - State createState() => new MainScreenState(); + _MyHomePageState createState() => _MyHomePageState(); } -class MainScreenState extends State with WidgetsBindingObserver { +class _MyHomePageState extends State with WidgetsBindingObserver { bool _isSdkEnabled = true; @override @@ -63,13 +93,15 @@ class MainScreenState extends State with WidgetsBindingObserver { initPlatformState() async { AdjustConfig config = new AdjustConfig('2fm9gkqubvpc', AdjustEnvironment.sandbox); config.logLevel = AdjustLogLevel.verbose; - config.isDeviceKnown = false; + // config.isDeviceKnown = false; // config.defaultTracker = 'abc123'; // config.processName = 'com.adjust.examples'; // config.sendInBackground = true; // config.eventBufferingEnabled = true; // config.delayStart = 6.0; // config.setAppSecret(1000, 1, 2, 3, 4); + // config.externalDeviceId = 'random-external-device-id'; + // config.deactivateSKAdNetworkHandling(); config.attributionCallback = (AdjustAttribution attributionChangedData) { print('[Adjust]: Attribution changed!'); @@ -190,8 +222,6 @@ class MainScreenState extends State with WidgetsBindingObserver { print('[Adjust]: Received deferred deeplink: ' + uri); }; - config.externalDeviceId = 'random-external-device-id'; - // Add session callback parameters. Adjust.addSessionCallbackParameter('scp_foo_1', 'scp_bar'); Adjust.addSessionCallbackParameter('scp_foo_2', 'scp_value'); @@ -210,19 +240,31 @@ class MainScreenState extends State with WidgetsBindingObserver { // Clear all session partner parameters. Adjust.resetSessionPartnerParameters(); + // Ask for tracking consent. + Adjust.requestTrackingAuthorizationWithCompletionHandler().then((status) { + print('[Adjust]: Authorization status update!'); + switch (status) { + case 0: + print('[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusNotDetermined'); + break; + case 1: + print('[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusRestricted'); + break; + case 2: + print('[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusDenied'); + break; + case 3: + print('[Adjust]: Authorization status update: ATTrackingManagerAuthorizationStatusAuthorized'); + break; + } + }); + // Start SDK. Adjust.start(config); } @override Widget build(BuildContext context) { - return new Scaffold( - appBar: new AppBar(title: new Text('Adjust Flutter Example App')), - body: _buildMainContent(), - ); - } - - _buildMainContent() { return new CustomScrollView( shrinkWrap: true, slivers: [ diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 0e283ae..16a5140 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,16 +1,47 @@ -name: adjust_example -description: Example app which demonstrates how to use the adjust_sdk Flutter plugin. +name: example +description: Adjust Flutter Appliaction + +# The following line prevents the package from being accidentally published to +# pub.dev using `pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.7.0 <3.0.0" dependencies: flutter: sdk: flutter adjust_sdk: path: ../ - cupertino_icons: ^0.1.0 + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^0.1.3 dev_dependencies: flutter_test: sdk: flutter +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. uses-material-design: true diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index b6e78c6..747db1d 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -1,22 +1,30 @@ // 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. +// +// 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:example/main.dart'; void main() { - testWidgets('Verify Platform version', (WidgetTester tester) async { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(new AdjustExampleApp()); + await tester.pumpWidget(MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); - // Verify that platform version is retrieved. - expect( - find.byWidgetPredicate( - (Widget widget) => - widget is Text && widget.data.startsWith('Running on:'), - ), - findsOneWidget); + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); }); } diff --git a/ios/Classes/AdjustSdk.m b/ios/Classes/AdjustSdk.m index 4a79715..1846ec0 100644 --- a/ios/Classes/AdjustSdk.m +++ b/ios/Classes/AdjustSdk.m @@ -70,6 +70,8 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result [self trackAppStoreSubscription:call withResult:result]; } else if ([@"trackPlayStoreSubscription" isEqualToString:call.method]) { [self trackPlayStoreSubscription:call withResult:result]; + } else if ([@"requestTrackingAuthorizationWithCompletionHandler" isEqualToString:call.method]) { + [self requestTrackingAuthorizationWithCompletionHandler:call withResult:result]; } else if ([@"setTestOptions" isEqualToString:call.method]) { [self setTestOptions:call withResult:result]; } else if ([@"addSessionCallbackParameter" isEqualToString:call.method]) { @@ -131,6 +133,7 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result { NSString *sendInBackground = call.arguments[@"sendInBackground"]; NSString *allowiAdInfoReading = call.arguments[@"allowiAdInfoReading"]; NSString *allowIdfaReading = call.arguments[@"allowIdfaReading"]; + NSString *skAdNetworkHandling = call.arguments[@"skAdNetworkHandling"]; NSString *dartAttributionCallback = call.arguments[@"attributionCallback"]; NSString *dartSessionSuccessCallback = call.arguments[@"sessionSuccessCallback"]; NSString *dartSessionFailureCallback = call.arguments[@"sessionFailureCallback"]; @@ -197,6 +200,13 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result { if ([self isFieldValid:allowIdfaReading]) { [adjustConfig setAllowIdfaReading:[allowIdfaReading boolValue]]; } + + // SKAdNetwork handling. + if ([self isFieldValid:skAdNetworkHandling]) { + if ([skAdNetworkHandling boolValue] == NO) { + [adjustConfig deactivateSKAdNetworkHandling]; + } + } // Set device known. if ([self isFieldValid:isDeviceKnown]) { @@ -387,7 +397,7 @@ - (void)trackAppStoreSubscription:(FlutterMethodCall *)call withResult:(FlutterR NSString *receipt = call.arguments[@"receipt"]; NSString *transactionDate = call.arguments[@"transactionDate"]; NSString *salesRegion = call.arguments[@"salesRegion"]; - NSString *billingStore = call.arguments[@"billingStore"]; + // NSString *billingStore = call.arguments[@"billingStore"]; NSString *strCallbackParametersJson = call.arguments[@"callbackParameters"]; NSString *strPartnerParametersJson = call.arguments[@"partnerParameters"]; @@ -484,6 +494,12 @@ - (void)getSdkVersion:(FlutterMethodCall *)call withResult:(FlutterResult)result result(sdkVersion); } +- (void)requestTrackingAuthorizationWithCompletionHandler:(FlutterMethodCall *)call withResult:(FlutterResult)result { + [Adjust requestTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) { + result([NSNumber numberWithUnsignedLong:status]); + }]; +} + - (void)setTestOptions:(FlutterMethodCall *)call withResult:(FlutterResult)result { AdjustTestOptions *testOptions = [[AdjustTestOptions alloc] init]; NSString *baseUrl = call.arguments[@"baseUrl"]; diff --git a/lib/adjust.dart b/lib/adjust.dart index cffc4b7..67bf4fc 100644 --- a/lib/adjust.dart +++ b/lib/adjust.dart @@ -107,6 +107,11 @@ class Adjust { } } + static Future requestTrackingAuthorizationWithCompletionHandler() async { + final num status = await _channel.invokeMethod('requestTrackingAuthorizationWithCompletionHandler'); + return status; + } + static Future getAttribution() async { final Map attributionMap = await _channel.invokeMethod('getAttribution'); return AdjustAttribution.fromMap(attributionMap); diff --git a/lib/adjust_config.dart b/lib/adjust_config.dart index 7a25bf2..30a4c44 100644 --- a/lib/adjust_config.dart +++ b/lib/adjust_config.dart @@ -39,6 +39,7 @@ class AdjustConfig { num _secretId; String _appToken; AdjustEnvironment _environment; + bool _skAdNetworkHandling; double delayStart; bool isDeviceKnown; @@ -51,6 +52,7 @@ class AdjustConfig { String userAgent; String defaultTracker; String externalDeviceId; + String urlStrategy; String processName; AdjustLogLevel logLevel; AttributionCallback attributionCallback; @@ -59,11 +61,10 @@ class AdjustConfig { EventSuccessCallback eventSuccessCallback; EventFailureCallback eventFailureCallback; DeferredDeeplinkCallback deferredDeeplinkCallback; - String urlStrategy; - bool preinstallTrackingEnabled; AdjustConfig(this._appToken, this._environment) { _initCallbackHandlers(); + _skAdNetworkHandling = true; } void setAppSecret(num secretId, num info1, num info2, num info3, num info4) { @@ -74,6 +75,10 @@ class AdjustConfig { _info4 = info4; } + void deactivateSKAdNetworkHandling() { + _skAdNetworkHandling = false; + } + void _initCallbackHandlers() { _channel.setMethodCallHandler((MethodCall call) { try { @@ -145,6 +150,9 @@ class AdjustConfig { if (externalDeviceId != null) { configMap['externalDeviceId'] = externalDeviceId; } + if (urlStrategy != null) { + configMap['urlStrategy'] = urlStrategy; + } if (isDeviceKnown != null) { configMap['isDeviceKnown'] = isDeviceKnown.toString(); } @@ -160,6 +168,9 @@ class AdjustConfig { if (allowIdfaReading != null) { configMap['allowIdfaReading'] = allowIdfaReading.toString(); } + if (_skAdNetworkHandling != null) { + configMap['skAdNetworkHandling'] = _skAdNetworkHandling.toString(); + } if (launchDeferredDeeplink != null) { configMap['launchDeferredDeeplink'] = launchDeferredDeeplink.toString(); } @@ -199,12 +210,6 @@ class AdjustConfig { if (deferredDeeplinkCallback != null) { configMap['deferredDeeplinkCallback'] = _deferredDeeplinkCallbackName; } - if (urlStrategy != null) { - configMap['urlStrategy'] = urlStrategy; - } - if (preinstallTrackingEnabled != null) { - configMap['preinstallTrackingEnabled'] = preinstallTrackingEnabled.toString(); - } return configMap; } From 3722c813edc8143cddf22051d628f8d077f35435 Mon Sep 17 00:00:00 2001 From: ugi Date: Fri, 28 Aug 2020 14:40:44 +0200 Subject: [PATCH 6/8] recreate test app --- test/app/.flutter-plugins-dependencies | 2 +- test/app/.gitignore | 38 ++- test/app/.metadata | 6 +- test/app/README.md | 16 +- test/app/android/.gitignore | 17 +- .../org.eclipse.buildship.core.prefs | 1 - test/app/android/app/build.gradle | 14 +- .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 49 ++-- .../com/adjust/test/app/MainActivity.java | 20 -- .../kotlin/com/adjust/app/MainActivity.kt | 6 + .../app/src/main/res/values/styles.xml | 10 + .../app/src/profile/AndroidManifest.xml | 7 + test/app/android/build.gradle | 4 +- test/app/android/gradle.properties | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 4 +- test/app/android/settings.gradle | 18 +- test/app/ios/.gitignore | 65 ++--- test/app/ios/Flutter/AppFrameworkInfo.plist | 4 +- .../ios/Flutter/flutter_export_environment.sh | 4 + test/app/ios/Podfile | 71 ++---- test/app/ios/Runner.xcodeproj/project.pbxproj | 229 +++++++++++++----- .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 12 +- .../xcshareddata/WorkspaceSettings.xcsettings | 8 + test/app/ios/Runner/AppDelegate.h | 6 - test/app/ios/Runner/AppDelegate.m | 13 - test/app/ios/Runner/AppDelegate.swift | 13 + .../Icon-App-1024x1024@1x.png | Bin 11112 -> 10932 bytes test/app/ios/Runner/Info.plist | 4 +- test/app/ios/Runner/Runner-Bridging-Header.h | 1 + test/app/ios/Runner/main.m | 9 - test/app/lib/command_executor.dart | 7 +- test/app/lib/main.dart | 4 +- test/app/pubspec.yaml | 68 +++++- test/app/test/widget_test.dart | 30 +++ test/ios/Classes/TestlibPlugin.m | 2 +- 37 files changed, 497 insertions(+), 284 deletions(-) delete mode 100644 test/app/android/.settings/org.eclipse.buildship.core.prefs create mode 100644 test/app/android/app/src/debug/AndroidManifest.xml delete mode 100644 test/app/android/app/src/main/java/com/adjust/test/app/MainActivity.java create mode 100644 test/app/android/app/src/main/kotlin/com/adjust/app/MainActivity.kt create mode 100644 test/app/android/app/src/profile/AndroidManifest.xml create mode 100644 test/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 test/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings delete mode 100644 test/app/ios/Runner/AppDelegate.h delete mode 100644 test/app/ios/Runner/AppDelegate.m create mode 100644 test/app/ios/Runner/AppDelegate.swift create mode 100644 test/app/ios/Runner/Runner-Bridging-Header.h delete mode 100644 test/app/ios/Runner/main.m create mode 100644 test/app/test/widget_test.dart diff --git a/test/app/.flutter-plugins-dependencies b/test/app/.flutter-plugins-dependencies index c8f14f4..a646f44 100644 --- a/test/app/.flutter-plugins-dependencies +++ b/test/app/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"adjust_sdk","path":"/Users/uerceg/GitHub/flutter_sdk_dev/","dependencies":[]},{"name":"test_lib","path":"/Users/uerceg/GitHub/flutter_sdk_dev/test/","dependencies":[]}],"android":[{"name":"adjust_sdk","path":"/Users/uerceg/GitHub/flutter_sdk_dev/","dependencies":[]},{"name":"test_lib","path":"/Users/uerceg/GitHub/flutter_sdk_dev/test/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"adjust_sdk","dependencies":[]},{"name":"test_lib","dependencies":[]}],"date_created":"2020-08-03 12:23:35.609734","version":"1.17.5"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"adjust_sdk","path":"/Users/uerceg/GitHub/flutter_sdk_dev/","dependencies":[]},{"name":"test_lib","path":"/Users/uerceg/GitHub/flutter_sdk_dev/test/","dependencies":[]}],"android":[{"name":"adjust_sdk","path":"/Users/uerceg/GitHub/flutter_sdk_dev/","dependencies":[]},{"name":"test_lib","path":"/Users/uerceg/GitHub/flutter_sdk_dev/test/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"adjust_sdk","dependencies":[]},{"name":"test_lib","dependencies":[]}],"date_created":"2020-08-28 14:12:43.519223","version":"1.22.0-2.0.pre.105"} \ No newline at end of file diff --git a/test/app/.gitignore b/test/app/.gitignore index dee655c..9d532b1 100644 --- a/test/app/.gitignore +++ b/test/app/.gitignore @@ -1,9 +1,41 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp .DS_Store -.dart_tool/ +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies .packages +.pub-cache/ .pub/ +/build/ -build/ +# Web related +lib/generated_plugin_registrant.dart -.flutter-plugins +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json diff --git a/test/app/.metadata b/test/app/.metadata index c176b87..c7645f4 100644 --- a/test/app/.metadata +++ b/test/app/.metadata @@ -4,5 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: 9299c02cf708497d6f72edda8efae0bb8340660e - channel: beta + revision: cad4d1333eb70e66fe8e993b10fa09306a48269d + channel: master + +project_type: app diff --git a/test/app/README.md b/test/app/README.md index 49ea19e..77323b2 100644 --- a/test/app/README.md +++ b/test/app/README.md @@ -1,8 +1,16 @@ -# test_app +# app -Adjust Test (CI) App for Flutter SDK. +Adjust Flutter Test Application ## Getting Started -For help getting started with Flutter, view our online -[documentation](https://flutter.io/). +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/test/app/android/.gitignore b/test/app/android/.gitignore index 65b7315..0a741cb 100644 --- a/test/app/android/.gitignore +++ b/test/app/android/.gitignore @@ -1,10 +1,11 @@ -*.iml -*.class -.gradle +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat /local.properties -/.idea/workspace.xml -/.idea/libraries -.DS_Store -/build -/captures GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties diff --git a/test/app/android/.settings/org.eclipse.buildship.core.prefs b/test/app/android/.settings/org.eclipse.buildship.core.prefs deleted file mode 100644 index b3c7fde..0000000 --- a/test/app/android/.settings/org.eclipse.buildship.core.prefs +++ /dev/null @@ -1 +0,0 @@ -eclipse.preferences.version=1 diff --git a/test/app/android/app/build.gradle b/test/app/android/app/build.gradle index 39e11eb..1a3f384 100644 --- a/test/app/android/app/build.gradle +++ b/test/app/android/app/build.gradle @@ -22,23 +22,27 @@ if (flutterVersionName == null) { } apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion 29 + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + lintOptions { disable 'InvalidPackage' } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.adjust.test.app" + applicationId "com.adjust.app" minSdkVersion 16 targetSdkVersion 29 versionCode flutterVersionCode.toInteger() versionName flutterVersionName - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { @@ -55,10 +59,8 @@ flutter { } dependencies { - testImplementation 'junit:junit:4.13' - androidTestImplementation 'androidx.test.ext:junit:1.1.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.google.android.gms:play-services-analytics:17.0.0' - implementation 'com.android.installreferrer:installreferrer:1.1.2' + implementation 'com.android.installreferrer:installreferrer:2.1' implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.6.2' } diff --git a/test/app/android/app/src/debug/AndroidManifest.xml b/test/app/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..3cf2e6b --- /dev/null +++ b/test/app/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/test/app/android/app/src/main/AndroidManifest.xml b/test/app/android/app/src/main/AndroidManifest.xml index 9e45558..58249ba 100644 --- a/test/app/android/app/src/main/AndroidManifest.xml +++ b/test/app/android/app/src/main/AndroidManifest.xml @@ -1,14 +1,5 @@ - - - - - - + package="com.adjust.app"> - + + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" + /> + + - - - - - - - + + diff --git a/test/app/android/app/src/main/java/com/adjust/test/app/MainActivity.java b/test/app/android/app/src/main/java/com/adjust/test/app/MainActivity.java deleted file mode 100644 index f793327..0000000 --- a/test/app/android/app/src/main/java/com/adjust/test/app/MainActivity.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.adjust.test.app; - -import android.content.Intent; -import android.os.Bundle; - -import io.flutter.app.FlutterActivity; -import io.flutter.plugins.GeneratedPluginRegistrant; - -public class MainActivity extends FlutterActivity { - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - GeneratedPluginRegistrant.registerWith(this); - } - - @Override - protected void onNewIntent(Intent intent) { - super.onNewIntent(intent); - } -} diff --git a/test/app/android/app/src/main/kotlin/com/adjust/app/MainActivity.kt b/test/app/android/app/src/main/kotlin/com/adjust/app/MainActivity.kt new file mode 100644 index 0000000..ab65b3c --- /dev/null +++ b/test/app/android/app/src/main/kotlin/com/adjust/app/MainActivity.kt @@ -0,0 +1,6 @@ +package com.adjust.app + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/test/app/android/app/src/main/res/values/styles.xml b/test/app/android/app/src/main/res/values/styles.xml index 00fa441..1f83a33 100644 --- a/test/app/android/app/src/main/res/values/styles.xml +++ b/test/app/android/app/src/main/res/values/styles.xml @@ -1,8 +1,18 @@ + + + diff --git a/test/app/android/app/src/profile/AndroidManifest.xml b/test/app/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..3cf2e6b --- /dev/null +++ b/test/app/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/test/app/android/build.gradle b/test/app/android/build.gradle index cd23eff..3100ad2 100644 --- a/test/app/android/build.gradle +++ b/test/app/android/build.gradle @@ -1,11 +1,13 @@ buildscript { + ext.kotlin_version = '1.3.50' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:4.0.0' + classpath 'com.android.tools.build:gradle:3.5.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/test/app/android/gradle.properties b/test/app/android/gradle.properties index b6e61b6..a673820 100644 --- a/test/app/android/gradle.properties +++ b/test/app/android/gradle.properties @@ -1,4 +1,4 @@ -android.enableJetifier=true -android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true android.enableR8=true diff --git a/test/app/android/gradle/wrapper/gradle-wrapper.properties b/test/app/android/gradle/wrapper/gradle-wrapper.properties index aabdb8c..296b146 100644 --- a/test/app/android/gradle/wrapper/gradle-wrapper.properties +++ b/test/app/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jun 09 22:35:11 CEST 2020 +#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/test/app/android/settings.gradle b/test/app/android/settings.gradle index 5a2f14f..44e62bc 100644 --- a/test/app/android/settings.gradle +++ b/test/app/android/settings.gradle @@ -1,15 +1,11 @@ include ':app' -def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() -def plugins = new Properties() -def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') -if (pluginsFile.exists()) { - pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } -} +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/test/app/ios/.gitignore b/test/app/ios/.gitignore index 79cc4da..e96ef60 100644 --- a/test/app/ios/.gitignore +++ b/test/app/ios/.gitignore @@ -1,45 +1,32 @@ -.idea/ -.vagrant/ -.sconsign.dblite -.svn/ - -.DS_Store -*.swp -profile - -DerivedData/ -build/ -GeneratedPluginRegistrant.h -GeneratedPluginRegistrant.m - -.generated/ - -*.pbxuser *.mode1v3 *.mode2v3 +*.moved-aside +*.pbxuser *.perspectivev3 - -!default.pbxuser +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. !default.mode1v3 !default.mode2v3 +!default.pbxuser !default.perspectivev3 - -xcuserdata - -*.moved-aside - -*.pyc -*sync/ -Icon? -.tags* - -/Flutter/app.flx -/Flutter/app.zip -/Flutter/flutter_assets/ -/Flutter/App.framework -/Flutter/Flutter.framework -/Flutter/Generated.xcconfig -/ServiceDefinitions.json - -Pods/ -.symlinks/ diff --git a/test/app/ios/Flutter/AppFrameworkInfo.plist b/test/app/ios/Flutter/AppFrameworkInfo.plist index 9367d48..f2872cf 100644 --- a/test/app/ios/Flutter/AppFrameworkInfo.plist +++ b/test/app/ios/Flutter/AppFrameworkInfo.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable App CFBundleIdentifier @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 9.0 diff --git a/test/app/ios/Flutter/flutter_export_environment.sh b/test/app/ios/Flutter/flutter_export_environment.sh index 130c557..809521e 100755 --- a/test/app/ios/Flutter/flutter_export_environment.sh +++ b/test/app/ios/Flutter/flutter_export_environment.sh @@ -9,3 +9,7 @@ export "OTHER_LDFLAGS=$(inherited) -framework Flutter" export "FLUTTER_FRAMEWORK_DIR=/Users/uerceg/Development/flutter/bin/cache/artifacts/engine/ios" export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NUMBER=1" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=false" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.packages" diff --git a/test/app/ios/Podfile b/test/app/ios/Podfile index c297262..1e8c3c9 100644 --- a/test/app/ios/Podfile +++ b/test/app/ios/Podfile @@ -1,64 +1,41 @@ # Uncomment this line to define a global platform for your project # platform :ios, '9.0' -platform :ios, '8.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' -def parse_KV_file(file, separator='=') - file_abs_path = File.expand_path(file) - if !File.exists? file_abs_path - return []; +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches end - pods_ary = [] - skip_line_start_symbols = ["#", "/"] - File.foreach(file_abs_path) { |line| - next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } - plugin = line.split(pattern=separator) - if plugin.length == 2 - podname = plugin[0].strip() - path = plugin[1].strip() - podpath = File.expand_path("#{path}", file_abs_path) - pods_ary.push({:name => podname, :path => podpath}); - else - puts "Invalid plugin specification: #{line}" - end - } - return pods_ary + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" end -target 'Runner' do - # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock - # referring to absolute paths on developers' machines. - system('rm -rf .symlinks') - system('mkdir -p .symlinks/plugins') +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - # Flutter Pods - generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') - if generated_xcode_build_settings.empty? - puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." - end - generated_xcode_build_settings.map { |p| - if p[:name] == 'FLUTTER_FRAMEWORK_DIR' - symlink = File.join('.symlinks', 'flutter') - File.symlink(File.dirname(p[:path]), symlink) - pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) - end - } +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! - # Plugin Pods - plugin_pods = parse_KV_file('../.flutter-plugins') - plugin_pods.map { |p| - symlink = File.join('.symlinks', 'plugins', p[:name]) - File.symlink(p[:path], symlink) - pod p[:name], :path => File.join(symlink, 'ios') - } + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end post_install do |installer| installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['ENABLE_BITCODE'] = 'NO' - end + flutter_additional_ios_build_settings(target) end end diff --git a/test/app/ios/Runner.xcodeproj/project.pbxproj b/test/app/ios/Runner.xcodeproj/project.pbxproj index d246162..b1d4806 100644 --- a/test/app/ios/Runner.xcodeproj/project.pbxproj +++ b/test/app/ios/Runner.xcodeproj/project.pbxproj @@ -3,18 +3,19 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 50; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 4C9F6C6D730AA56A5296E8A6 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA6D2ADCA3E99F20698382B6 /* libPods-Runner.a */; }; - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; - 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 936021FAD72D80C63D28B147 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25BDC56193274910EAD034C3 /* Pods_Runner.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 */; }; + 9DF8057024F92ECB00A001CE /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DF8056F24F92ECB00A001CE /* iAd.framework */; }; + 9DF8057224F92ED000A001CE /* AdSupport.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9DF8057124F92ED000A001CE /* AdSupport.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -33,21 +34,23 @@ /* Begin PBXFileReference section */ 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 = ""; }; + 25BDC56193274910EAD034C3 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 529C72E42E3CCC1FD489E3E5 /* 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 = ""; }; + 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 = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 80BAFB441DF331A6DACA7F7C /* 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 = ""; }; 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; }; - 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 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 = ""; }; - AF384EA54ECCB853A745FDAF /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - EE956E1BDE2A7284B6E1F58D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; - FA6D2ADCA3E99F20698382B6 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 9DF8056F24F92ECB00A001CE /* iAd.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iAd.framework; path = System/Library/Frameworks/iAd.framework; sourceTree = SDKROOT; }; + 9DF8057124F92ED000A001CE /* AdSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdSupport.framework; path = System/Library/Frameworks/AdSupport.framework; sourceTree = SDKROOT; }; + FCC573983476B33DDEA1A95A /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -55,28 +58,33 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4C9F6C6D730AA56A5296E8A6 /* libPods-Runner.a in Frameworks */, + 936021FAD72D80C63D28B147 /* Pods_Runner.framework in Frameworks */, + 9DF8057024F92ECB00A001CE /* iAd.framework in Frameworks */, + 9DF8057224F92ED000A001CE /* AdSupport.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 6EB48117BB5A78EBE9A12858 /* Pods */ = { + 1E115D8BF851445370C38B97 /* Frameworks */ = { isa = PBXGroup; children = ( - EE956E1BDE2A7284B6E1F58D /* Pods-Runner.debug.xcconfig */, - AF384EA54ECCB853A745FDAF /* Pods-Runner.release.xcconfig */, + 9DF8057124F92ED000A001CE /* AdSupport.framework */, + 9DF8056F24F92ECB00A001CE /* iAd.framework */, + 25BDC56193274910EAD034C3 /* Pods_Runner.framework */, ); - name = Pods; + name = Frameworks; sourceTree = ""; }; - 70FBC02802FFFCD3397D3197 /* Frameworks */ = { + 4546E54DAE5FCB3A6AACECE4 /* Pods */ = { isa = PBXGroup; children = ( - FA6D2ADCA3E99F20698382B6 /* libPods-Runner.a */, + FCC573983476B33DDEA1A95A /* Pods-Runner.debug.xcconfig */, + 529C72E42E3CCC1FD489E3E5 /* Pods-Runner.release.xcconfig */, + 80BAFB441DF331A6DACA7F7C /* Pods-Runner.profile.xcconfig */, ); - name = Frameworks; + path = Pods; sourceTree = ""; }; 9740EEB11CF90186004384FC /* Flutter */ = { @@ -96,8 +104,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 6EB48117BB5A78EBE9A12858 /* Pods */, - 70FBC02802FFFCD3397D3197 /* Frameworks */, + 4546E54DAE5FCB3A6AACECE4 /* Pods */, + 1E115D8BF851445370C38B97 /* Frameworks */, ); sourceTree = ""; }; @@ -112,27 +120,18 @@ 97C146F01CF9000F007C117D /* Runner */ = { isa = PBXGroup; children = ( - 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, - 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 97C146FA1CF9000F007C117D /* Main.storyboard */, 97C146FD1CF9000F007C117D /* Assets.xcassets */, 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97C147021CF9000F007C117D /* Info.plist */, - 97C146F11CF9000F007C117D /* Supporting Files */, 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, ); path = Runner; sourceTree = ""; }; - 97C146F11CF9000F007C117D /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 97C146F21CF9000F007C117D /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -140,14 +139,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 2761C904878AAA599EA7B767 /* [CP] Check Pods Manifest.lock */, + 6E5D8FD11C1DCB40AD631E85 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - E9C29E7513D14B2D79B28B90 /* [CP] Embed Pods Frameworks */, + 14E06C223349C49889E62E4E /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -164,17 +163,17 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1130; - ORGANIZATIONNAME = "The Chromium Authors"; + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; - DevelopmentTeam = QGUGW9AUMK; + LastSwiftMigration = 1100; }; }; }; buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -206,22 +205,21 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2761C904878AAA599EA7B767 /* [CP] Check Pods Manifest.lock */ = { + 14E06C223349C49889E62E4E /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-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-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { @@ -238,37 +236,41 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { + 6E5D8FD11C1DCB40AD631E85 /* [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 = ( ); - name = "Run Script"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + 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; }; - E9C29E7513D14B2D79B28B90 /* [CP] Embed Pods Frameworks */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", ); - name = "[CP] Embed Pods Frameworks"; + name = "Run Script"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; /* End PBXShellScriptBuildPhase section */ @@ -277,8 +279,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, - 97C146F31CF9000F007C117D /* main.m in Sources */, + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -305,9 +306,88 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = QGUGW9AUMK; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -353,7 +433,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -363,7 +443,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -403,9 +482,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -416,22 +498,28 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = QGUGW9AUMK; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", - "$(PROJECT_DIR)/Frameworks", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.test.app; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -441,22 +529,27 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = QGUGW9AUMK; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", - "$(PROJECT_DIR)/Frameworks", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.adjust.test.app; + PRODUCT_BUNDLE_IDENTIFIER = com.adjust.examples; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; @@ -469,6 +562,7 @@ buildConfigurations = ( 97C147031CF9000F007C117D /* Debug */, 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -478,6 +572,7 @@ buildConfigurations = ( 97C147061CF9000F007C117D /* Debug */, 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/test/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/test/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/test/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/test/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/test/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index eff2bca..a28140c 100644 --- a/test/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/test/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + + - - + + + + + + + + PreviewsEnabled + + + diff --git a/test/app/ios/Runner/AppDelegate.h b/test/app/ios/Runner/AppDelegate.h deleted file mode 100644 index 36e21bb..0000000 --- a/test/app/ios/Runner/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : FlutterAppDelegate - -@end diff --git a/test/app/ios/Runner/AppDelegate.m b/test/app/ios/Runner/AppDelegate.m deleted file mode 100644 index 59a72e9..0000000 --- a/test/app/ios/Runner/AppDelegate.m +++ /dev/null @@ -1,13 +0,0 @@ -#include "AppDelegate.h" -#include "GeneratedPluginRegistrant.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application - didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - [GeneratedPluginRegistrant registerWithRegistry:self]; - // Override point for customization after application launch. - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -@end diff --git a/test/app/ios/Runner/AppDelegate.swift b/test/app/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/test/app/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/test/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/test/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png index 3d43d11e66f4de3da27ed045ca4fe38ad8b48094..dc9ada4725e9b0ddb1deab583e5b5102493aa332 100644 GIT binary patch literal 10932 zcmeHN2~<R zh`|8`A_PQ1nSu(UMFx?8j8PC!!VDphaL#`F42fd#7Vlc`zIE4n%Y~eiz4y1j|NDpi z?<@|pSJ-HM`qifhf@m%MamgwK83`XpBA<+azdF#2QsT{X@z0A9Bq>~TVErigKH1~P zRX-!h-f0NJ4Mh++{D}J+K>~~rq}d%o%+4dogzXp7RxX4C>Km5XEI|PAFDmo;DFm6G zzjVoB`@qW98Yl0Kvc-9w09^PrsobmG*Eju^=3f?0o-t$U)TL1B3;sZ^!++3&bGZ!o-*6w?;oOhf z=A+Qb$scV5!RbG+&2S}BQ6YH!FKb0``VVX~T$dzzeSZ$&9=X$3)_7Z{SspSYJ!lGE z7yig_41zpQ)%5dr4ff0rh$@ky3-JLRk&DK)NEIHecf9c*?Z1bUB4%pZjQ7hD!A0r-@NF(^WKdr(LXj|=UE7?gBYGgGQV zidf2`ZT@pzXf7}!NH4q(0IMcxsUGDih(0{kRSez&z?CFA0RVXsVFw3^u=^KMtt95q z43q$b*6#uQDLoiCAF_{RFc{!H^moH_cmll#Fc^KXi{9GDl{>%+3qyfOE5;Zq|6#Hb zp^#1G+z^AXfRKaa9HK;%b3Ux~U@q?xg<2DXP%6k!3E)PA<#4$ui8eDy5|9hA5&{?v z(-;*1%(1~-NTQ`Is1_MGdQ{+i*ccd96ab$R$T3=% zw_KuNF@vI!A>>Y_2p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u)NH5R}NT+=2Nap*`^%O)vz?+{PV<2~qX%TzdJOGeKj5_QjqR&a3*K@= P-1+_A+?hGkL;m(J7kc&K diff --git a/test/app/ios/Runner/Info.plist b/test/app/ios/Runner/Info.plist index 89b5553..c8a8f1d 100644 --- a/test/app/ios/Runner/Info.plist +++ b/test/app/ios/Runner/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -11,7 +11,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - test_app + app CFBundlePackageType APPL CFBundleShortVersionString diff --git a/test/app/ios/Runner/Runner-Bridging-Header.h b/test/app/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/test/app/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/test/app/ios/Runner/main.m b/test/app/ios/Runner/main.m deleted file mode 100644 index dff6597..0000000 --- a/test/app/ios/Runner/main.m +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import -#import "AppDelegate.h" - -int main(int argc, char* argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/test/app/lib/command_executor.dart b/test/app/lib/command_executor.dart index 6cec10a..4a192e8 100644 --- a/test/app/lib/command_executor.dart +++ b/test/app/lib/command_executor.dart @@ -336,10 +336,9 @@ class CommandExecutor { adjustConfig.urlStrategy = _command.getFirstParameterValue('urlStrategy'); } - if (_command.containsParameter('preinstallTrackingEnabled')) { - adjustConfig.preinstallTrackingEnabled = _command.getFirstParameterValue('preinstallTrackingEnabled') == 'true'; - } - + // if (_command.containsParameter('preinstallTrackingEnabled')) { + // adjustConfig.preinstallTrackingEnabled = _command.getFirstParameterValue('preinstallTrackingEnabled') == // 'true'; + // } } void _start() { diff --git a/test/app/lib/main.dart b/test/app/lib/main.dart index 4d68528..2618350 100644 --- a/test/app/lib/main.dart +++ b/test/app/lib/main.dart @@ -8,7 +8,9 @@ import 'package:test_app/command.dart'; import 'package:test_app/command_executor.dart'; import 'package:adjust_sdk/adjust.dart'; -void main() => runApp(new MyApp()); +void main() { + runApp(MyApp()); +} class MyApp extends StatefulWidget { @override diff --git a/test/app/pubspec.yaml b/test/app/pubspec.yaml index 85ac7df..71902b0 100644 --- a/test/app/pubspec.yaml +++ b/test/app/pubspec.yaml @@ -1,5 +1,24 @@ name: test_app -description: Adjust Test App for Flutter SDK. +description: Adjust Flutter Test Application + +# The following line prevents the package from being accidentally published to +# pub.dev using `pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.7.0 <3.0.0" dependencies: flutter: @@ -8,11 +27,54 @@ dependencies: path: ../../ test_lib: path: ../ - cupertino_icons: ^0.1.0 + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^0.1.3 dev_dependencies: flutter_test: sdk: flutter +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. flutter: - uses-material-design: true \ No newline at end of file + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/test/app/test/widget_test.dart b/test/app/test/widget_test.dart new file mode 100644 index 0000000..33f9fae --- /dev/null +++ b/test/app/test/widget_test.dart @@ -0,0 +1,30 @@ +// 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:app/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} diff --git a/test/ios/Classes/TestlibPlugin.m b/test/ios/Classes/TestlibPlugin.m index cace2dc..6e230d1 100644 --- a/test/ios/Classes/TestlibPlugin.m +++ b/test/ios/Classes/TestlibPlugin.m @@ -6,7 +6,7 @@ // Copyright (c) 2018 Adjust GmbH. All rights reserved. // -#import "TestLibPlugin.h" +#import "TestlibPlugin.h" #import "AdjustCommandExecutor.h" @interface TestLibPlugin () From 78aed645d9f9722d75a0ed5b19e1ff74492227bc Mon Sep 17 00:00:00 2001 From: ugi Date: Fri, 28 Aug 2020 14:42:39 +0200 Subject: [PATCH 7/8] update changelog --- CHANGELOG.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72237ce..ac1626a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ -### Version 4.23.0 (TBD) +### Version 4.23.0 (28th August 2020) #### Added -- Added `setUrlStrategy` method in `AdjustConfig` to allow setting of URL strategy for specific market. +- Added communication with SKAdNetwork framework by default on iOS 14. +- Added method `deactivateSKAdNetworkHandling` method to `AdjustConfig` to switch off default communication with SKAdNetwork framework in iOS 14. +- Added wrapper method `requestTrackingAuthorizationWithCompletionHandler` to `Adjust` to allow asking for user's consent to be tracked in iOS 14 and immediate propagation of user's choice to backend. +- Added handling of new iAd framework error codes introduced in iOS 14. +- Added sending of value of user's consent to be tracked with each package. +- Added `setUrlStrategy` method to `AdjustConfig` class to allow selection of URL strategy for specific market. + +⚠️ **Note**: iOS 14 beta versions prior to 5 appear to have an issue when trying to use iAd framework API like described in [here](https://github.com/adjust/ios_sdk/issues/452). For testing of v4.23.0 version of SDK in iOS, please make sure you're using **iOS 14 beta 5 or later**. #### Native SDKs - [iOS@v4.23.0][ios_sdk_v4.23.0] From 69c96ab8129531adb46bd9347432c4d4f8462cfa Mon Sep 17 00:00:00 2001 From: ugi Date: Fri, 28 Aug 2020 14:50:48 +0200 Subject: [PATCH 8/8] update readme --- README.md | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/README.md b/README.md index 77d2276..d563397 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,8 @@ This is the Flutter SDK of Adjust™. You can read more about Adjust™ at [adju * [[Android] Install referrer](#qs-install-referrer) * [[Android] Google Play Referrer API](#qs-gpr-api) * [[Android] Google Play Store intent](#qs-gps-intent) + * [[Android] Huawei Referrer API](#qs-hr-api) + * [[iOS] Link additional frameworks](#qs-ios-frameworks) * [Integrate the SDK into your app](#qs-integrate-sdk) * [Basic setup](#qs-basic-setup) * [Session tracking](#qs-session-tracking) @@ -51,6 +53,9 @@ This is the Flutter SDK of Adjust™. You can read more about Adjust™ at [adju ### Additional features + * [AppTrackingTransparency framework](#af-att-framework) + * [App-tracking authorisation wrapper](#af-ata-wrapper) + * [SKAdNetwork framework](#af-skadn-framework) * [Subscription tracking](#af-subscription-tracking) * [Push token (uninstall tracking)](#af-push-token) * [Attribution callback](#af-attribution-callback) @@ -188,6 +193,22 @@ We use this broadcast receiver to retrieve the install referrer and pass it to o If you are already using a different broadcast receiver for the `INSTALL_REFERRER` intent, follow [these instructions][multiple-receivers] to add the Adjust broadcast receiver. +#### [Android] Huawei Referrer API + +As of v4.22.0, the Adjust SDK supports install tracking on Huawei devices with Huawei App Gallery version 10.4 and higher. No additional integration steps are needed to start using the Huawei Referrer API. + +#### [iOS] Link additional frameworks + +Make sure that following iOS frameworks are linked with your iOS app: + +* `iAd.framework` - in case you are running iAd campaigns +* `AdSupport.framework` - for reading iOS Advertising Id (IDFA) +* `CoreTelephony.framework` - for reading MCC and MNC information +* `StoreKit.framework` - for communication with SKAdNetwork framework +* `AppTrackingTransparency.framework` - to ask for user's consent to be tracked and obtain status of that consent + +If you are not running any iAd campaigns, you can feel free to remove the `iAd.framework` dependency. If you don't use SKAdNetwork framework, feel free to remove `StoreKit.framework` dependency (unless you need it for something else). + ### Integrate the SDK into your app To start with, we'll set up basic session tracking. @@ -596,6 +617,69 @@ In this case, this will make the Adjust SDK not send the initial install session Once you have integrated the Adjust SDK into your project, you can take advantage of the following features. +### AppTrackingTransparency framework + +**Note**: This feature exists only in iOS platform. + +For each package sent, the Adjust backend receives one of the following four (4) states of consent for access to app-related data that can be used for tracking the user or the device: + +- Authorized +- Denied +- Not Determined +- Restricted + +After a device receives an authorization request to approve access to app-related data, which is used for user device tracking, the returned status will either be Authorized or Denied. + +Before a device receives an authorization request for access to app-related data, which is used for tracking the user or device, the returned status will be Not Determined. + +If authorization to use app tracking data is restricted, the returned status will be Restricted. + +The SDK has a built-in mechanism to receive an updated status after a user responds to the pop-up dialog, in case you don't want to customize your displayed dialog pop-up. To conveniently and efficiently communicate the new state of consent to the backend, Adjust SDK offers a wrapper around the app tracking authorization method described in the following chapter, App-tracking authorization wrapper. + +### App-tracking authorisation wrapper + +**Note**: This feature exists only in iOS platform. + +Adjust SDK offers the possibility to use it for requesting user authorization in accessing their app-related data. Adjust SDK has a wrapper built on top of the [requestTrackingAuthorizationWithCompletionHandler:](https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorizationwith?language=objc) method, where you can as well define the callback method to get information about a user's choice. Also, with the use of this wrapper, as soon as a user responds to the pop-up dialog, it's then communicated back using your callback method. The SDK will also inform the backend of the user's choice. Integer value will be delivered via your callback method with the following meaning: + +- 0: `ATTrackingManagerAuthorizationStatusNotDetermined` +- 1: `ATTrackingManagerAuthorizationStatusRestricted` +- 2: `ATTrackingManagerAuthorizationStatusDenied` +- 3: `ATTrackingManagerAuthorizationStatusAuthorized` + +To use this wrapper, you can call it as such: + +```dart +Adjust.requestTrackingAuthorizationWithCompletionHandler().then((status) { + switch (status) { + case 0: + // ATTrackingManagerAuthorizationStatusNotDetermined case + break; + case 1: + // ATTrackingManagerAuthorizationStatusRestricted case + break; + case 2: + // ATTrackingManagerAuthorizationStatusDenied case + break; + case 3: + // ATTrackingManagerAuthorizationStatusAuthorized case + break; + } +}); +``` + +### SKAdNetwork framework + +**Note**: This feature exists only in iOS platform. + +If you have implemented the Adjust SDK v4.23.0 or above and your app is running on iOS 14, the communication with SKAdNetwork will be set on by default, although you can choose to turn it off. When set on, Adjust automatically registers for SKAdNetwork attribution when the SDK is initialized. If events are set up in the Adjust dashboard to receive conversion values, the Adjust backend sends the conversion value data to the SDK. The SDK then sets the conversion value. After Adjust receives the SKAdNetwork callback data, it is then displayed in the dashboard. + +In case you don't want the Adjust SDK to automatically communicate with SKAdNetwork, you can disable that by calling the following method on configuration object: + +```dart +adjustConfig.deactivateSKAdNetworkHandling(); +``` + ### Subscription tracking **Note**: This feature is only available in the SDK v4.22.0 and above.