adjust / cordova_sdk

This is the Cordova SDK of
http://www.adjust.com
MIT License
36 stars 43 forks source link

requestTrackingAuthorizationWithCompletionHandler not opening any prompt. #133

Closed ir2pid closed 3 years ago

ir2pid commented 3 years ago

I tried invoking requestTrackingAuthorizationWithCompletionHandler and on debugging I see the below method being called but then there is no prompt shown on device.

- (void)requestTrackingAuthorizationWithCompletionHandler:(CDVInvokedUrlCommand *)command {
    [Adjust requestTrackingAuthorizationWithCompletionHandler:^(NSUInteger status) {
        CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsNSUInteger:status];
        [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
    }];
}

I'm using iOS 14.4 simulator Xcode 12.4 Allow app to request tracking is turned on in settings

What am I missing?

ir2pid commented 3 years ago

I had to add NSUserTrackingUsageDescription in plist and AppTrackingTransparency.framework in the build settings