@@ -123,6 +123,10 @@ - (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result
123123 [Adjust checkForNewAttStatus ];
124124 } else if ([@" getLastDeeplink" isEqualToString: call.method]) {
125125 [self getLastDeeplink: call withResult: result];
126+ } else if ([@" updateConversionValueWithErrorCallback" isEqualToString: call.method]) {
127+ [self updateConversionValueWithErrorCallback: call withResult: result];
128+ } else if ([@" updateConversionValueWithErrorCallbackSkad4" isEqualToString: call.method]) {
129+ [self updateConversionValueWithErrorCallbackSkad4: call withResult: result];
126130 } else {
127131 result (FlutterMethodNotImplemented);
128132 }
@@ -160,6 +164,7 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result {
160164 NSString *dartEventFailureCallback = call.arguments [@" eventFailureCallback" ];
161165 NSString *dartDeferredDeeplinkCallback = call.arguments [@" deferredDeeplinkCallback" ];
162166 NSString *dartConversionValueUpdatedCallback = call.arguments [@" conversionValueUpdatedCallback" ];
167+ NSString *dartSkad4ConversionValueUpdatedCallback = call.arguments [@" skad4ConversionValueUpdatedCallback" ];
163168 BOOL allowSuppressLogLevel = NO ;
164169 BOOL launchDeferredDeeplink = [call.arguments[@" launchDeferredDeeplink" ] boolValue ];
165170
@@ -221,6 +226,8 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result {
221226 [adjustConfig setUrlStrategy: ADJUrlStrategyChina];
222227 } else if ([urlStrategy isEqualToString: @" india" ]) {
223228 [adjustConfig setUrlStrategy: ADJUrlStrategyIndia];
229+ } else if ([urlStrategy isEqualToString: @" cn" ]) {
230+ [adjustConfig setUrlStrategy: ADJUrlStrategyCn];
224231 } else if ([urlStrategy isEqualToString: @" data-residency-eu" ]) {
225232 [adjustConfig setUrlStrategy: ADJDataResidencyEU];
226233 } else if ([urlStrategy isEqualToString: @" data-residency-tr" ]) {
@@ -292,7 +299,8 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result {
292299 || dartEventSuccessCallback != nil
293300 || dartEventFailureCallback != nil
294301 || dartDeferredDeeplinkCallback != nil
295- || dartConversionValueUpdatedCallback != nil ) {
302+ || dartConversionValueUpdatedCallback != nil
303+ || dartSkad4ConversionValueUpdatedCallback != nil ) {
296304 [adjustConfig setDelegate:
297305 [AdjustSdkDelegate getInstanceWithSwizzleOfAttributionCallback: dartAttributionCallback
298306 sessionSuccessCallback: dartSessionSuccessCallback
@@ -301,6 +309,7 @@ - (void)start:(FlutterMethodCall *)call withResult:(FlutterResult)result {
301309 eventFailureCallback: dartEventFailureCallback
302310 deferredDeeplinkCallback: dartDeferredDeeplinkCallback
303311 conversionValueUpdatedCallback: dartConversionValueUpdatedCallback
312+ skad4ConversionValueUpdatedCallback: dartSkad4ConversionValueUpdatedCallback
304313 shouldLaunchDeferredDeeplink: launchDeferredDeeplink
305314 andMethodChannel: self .channel]];
306315 }
@@ -691,6 +700,32 @@ - (void)getLastDeeplink:(FlutterMethodCall *)call withResult:(FlutterResult)resu
691700 }
692701}
693702
703+ - (void )updateConversionValueWithErrorCallback : (FlutterMethodCall *)call withResult : (FlutterResult)result {
704+ NSString *conversionValue = call.arguments [@" conversionValue" ];
705+ if ([self isFieldValid: conversionValue]) {
706+ [Adjust updatePostbackConversionValue: [conversionValue intValue ]
707+ completionHandler: ^(NSError * _Nullable error) {
708+ result ([error localizedDescription ]);
709+ }];
710+ }
711+ }
712+
713+ - (void )updateConversionValueWithErrorCallbackSkad4 : (FlutterMethodCall *)call withResult : (FlutterResult)result {
714+ NSString *conversionValue = call.arguments [@" conversionValue" ];
715+ NSString *coarseValue = call.arguments [@" coarseValue" ];
716+ NSString *lockWindow = call.arguments [@" lockWindow" ];
717+ if ([self isFieldValid: conversionValue] &&
718+ [self isFieldValid: coarseValue] &&
719+ [self isFieldValid: lockWindow]) {
720+ [Adjust updatePostbackConversionValue: [conversionValue intValue ]
721+ coarseValue: coarseValue
722+ lockWindow: (BOOL )lockWindow
723+ completionHandler: ^(NSError * _Nullable error) {
724+ result ([error localizedDescription ]);
725+ }];
726+ }
727+ }
728+
694729- (void )setTestOptions : (FlutterMethodCall *)call withResult : (FlutterResult)result {
695730 AdjustTestOptions *testOptions = [[AdjustTestOptions alloc ] init ];
696731 NSString *baseUrl = call.arguments [@" baseUrl" ];
0 commit comments