In IOS14 in order to use Advertising Identifier
you need to request for permission but what's the behaviour for apps already available on AppStore (Compiled with IOS13 SDK)?
I have updated a device to IOS14 Beta 4 and downloaded app from AppStore. Once I open the app it's not automatically asking for any tracking permission and Advertising Identifier
is 00000-0000-0000
.
Does this mean I must submit an app update compiled with IOS14 SDK and request for tracking permission otherwise Advertising Identifier
won't be available?
Yes, you need to submit a new app version. It will not automatically ask for tracking permission because it should be instantiated via developer.
Therefore, you need to use AppTrackingTransparency
framework and ask for a user permission:
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization { _ in
}
} else {
// Fallback on earlier versions
}