Post

Replies

Boosts

Views

Activity

Reply to ATTrackingManager.requestTrackingAuthorization stopped working in iOS 15
The app has now been accepted with the 2 seconds delayed call. But since a delay is not a best solution, we have now solved it differently. As before, we now call a method from viewDidLoad without delay. In this method we check the status of the application. If the status is not active, then we call this method recursively after 0.5 seconds. As soon as the status is active, we call App Tracking Transparency authorization prompt. It should work that way and get through the review without any problems. We'll try to submit an update tomorrow. -(void)initAds { UIApplication *applicaiton = [UIApplication sharedApplication]; if (applicaiton.applicationState == UIApplicationStateActive) { if (@available(iOS 14, *)) { ATTrackingManagerAuthorizationStatus status = [ATTrackingManager trackingAuthorizationStatus]; if(status == ATTrackingManagerAuthorizationStatusNotDetermined) { [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { // Tracking authorization completed. Start loading ads here. [[NSOperationQueue mainQueue] addOperationWithBlock:^ { [self loadBannerAd]; [self createAndLoadInterstitial]; }]; }]; } else { [self loadBannerAd]; [self createAndLoadInterstitial]; } } else { // Fallback on earlier versions } } else { [self performSelector:@selector(initAds) withObject:nil afterDelay:0.5f]; } }
Oct ’21