From 3a34962b87c9cfafb9904c0a83c86ce4ad3a5872 Mon Sep 17 00:00:00 2001 From: Amit Levy Date: Wed, 10 Apr 2024 10:49:37 +0300 Subject: [PATCH] Hotfix manualStart on iOS --- CHANGELOG.md | 2 ++ ios/Classes/AppsflyerSdkPlugin.m | 12 +++++++++--- pubspec.yaml | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae5e627..3d296ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ # Versions +## 6.13.2+1 +- Hotfix for manualStart on iOS ## 6.13.2 - Added new APIs such as `anonymizeUser` , `performOnDeepLinking` - Added to the `startSDK` API, `onSuccess` and `onError` callbacks diff --git a/ios/Classes/AppsflyerSdkPlugin.m b/ios/Classes/AppsflyerSdkPlugin.m index 4a51afc..9d0fec4 100644 --- a/ios/Classes/AppsflyerSdkPlugin.m +++ b/ios/Classes/AppsflyerSdkPlugin.m @@ -597,12 +597,18 @@ - (void)initSdkWithCall:(FlutterMethodCall*)call result:(FlutterResult)result{ id isUDPValue = nil; id isDisableCollectASA = nil; id isDisableAdvertisingIdentifier = nil; + id isManualStart = nil; devKey = call.arguments[afDevKey]; appId = call.arguments[afAppId]; timeToWaitForATTUserAuthorization = [(id)call.arguments[afTimeToWaitForATTUserAuthorization] doubleValue]; - manualStart = call.arguments[afManualStart]; - [self setIsManualStart:manualStart]; + + isManualStart = call.arguments[afManualStart]; + if([isManualStart isKindOfClass:[NSNumber class]]){ + manualStart = [(NSNumber*)isManualStart boolValue]; + [self setIsManualStart:manualStart]; + } + isDebugValue = call.arguments[afIsDebug]; if ([isDebugValue isKindOfClass:[NSNumber class]]) { @@ -669,7 +675,7 @@ - (void)initSdkWithCall:(FlutterMethodCall*)call result:(FlutterResult)result{ [[AppsFlyerLib shared] waitForATTUserAuthorizationWithTimeoutInterval:timeToWaitForATTUserAuthorization]; } - if (!manualStart){ + if (manualStart == NO){ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appDidBecomeActive) name:UIApplicationDidBecomeActiveNotification object:nil]; [[AppsFlyerLib shared] start]; } diff --git a/pubspec.yaml b/pubspec.yaml index 35f03a8..6f74216 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: appsflyer_sdk description: A Flutter plugin for AppsFlyer SDK. Supports iOS and Android. -version: 6.13.2 +version: 6.13.2+1 homepage: https://github.com/AppsFlyerSDK/flutter_appsflyer_sdk