Why iOS 14 ATT Prompt Won't Work on Simulator?

Viewed 899

I am trying to make a plugin for my unity project to call new ios 14 ATTracking. It doesn't prompt on screen, why ? I am not getting any error and i know that code goes into the if statement. Trying On Simulator, maybe thats why it doesn't work ?

+(void)requestAttPermission:(NSString*)callback
{
 if (@available(iOS 14, *)) {
  [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status)
   {
      UnitySendMessage("SomeGameObject", [callback UTF8String], "");
   }
 }
}
1 Answers

Apparently, it works on the iOS 14 simulator. What I did wrong was that I thought that the AppTrackingTransparency.framework was already added, but it wasn't.

After I added that framework (in Xcode -> Build Phases -> Link Binary With Libraries) it worked.

Related