Post

Replies

Boosts

Views

Activity

Reply to ATT bug, don't wait for user
If anyone would like an example requesting app tracking authorization using the workaround from @davidfromgainesville, but in the form of Objective-C, here is the code I used that is working for me: void requestTrackingAuthorization() { [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { if (status == ATTrackingManagerAuthorizationStatusDenied && [ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusNotDetermined) { [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationDidBecomeActiveNotification object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) { requestTrackingAuthorization(); }]; } else { // Do something with status } }]; }
May ’24