We are trying to get our app approved and all is good with the exception of out App Tracking permission prompt is not working on iPads, it is fine in the simulator and working fine on iPhones.
Here is a thread that we opened and managed to solve the issue of not prompt on any device.
https://developer.apple.com/forums/thread/702092
Any help would be much appreciated to finally get our app published.
Post
Replies
Boosts
Views
Activity
Hi,
I have seen many posts about this but still unable to get our app to prompt users for their permission.
we are a group of scouts trying to develop our first app and none of us have much if any experience and are now totally stuck.
we have tried many ways of putting the code in but the AppDelegate and MainViewController but still unable to get the prompt.
any advice or assistance would be gratefully appreciated
below is the last attempt where we had this code in our MainViewController.
-(void)viewDidLoad
{
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:^
{
[[GADMobileAds sharedInstance] startWithCompletionHandler:nil];
}];
}];
}
}
else
{
[[GADMobileAds sharedInstance] startWithCompletionHandler:nil];
// Fallback on earlier versions
}
}
[super viewDidLoad];
}