Post

Replies

Boosts

Views

Activity

IOS15 not showing ATT prompt using applicationDidBecomeActive
Hey guys, recently my proyect stop showing the ATT prompt and I cant find where is the problem when it worked perfect before. Previously I was using didFinishLaunchingWithOptions but i saw some post where said that was the problem and some solve the problem by changing to applicationDidBecomeActive. This is my current AppDelegate.m #import "AppDelegate.h" #import "MainViewController.h" #import <AppTrackingTransparency/AppTrackingTransparency.h> @implementation AppDelegate - (void)applicationDidBecomeActive(UIApplication*)application {     self.viewController = [[MainViewController alloc] init];     if (@available(iOS 14, *)) {         [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {             //If you want to do something with the pop-up         }];     } }@end While pre IOS 15 this code worked #import "AppDelegate.h" #import "MainViewController.h" #import <AppTrackingTransparency/AppTrackingTransparency.h> @implementation AppDelegate - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { self.viewController = [[MainViewController alloc] init]; if (@available(iOS 14, *)) { [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { //If you want to do something with the pop-up }]; } return [super application:application didFinishLaunchingWithOptions:launchOptions]; } @end I dont really know why the event is not getting triggered. Best regards.
3
0
2.9k
Oct ’21