[ad_1]
I’ve learn all exisiting posts about this matter, however till now I can’t get it to work.
Someway calling ATTrackingManager.requestTrackingAuthorization by no means reveals the popup.
I added Privateness – Monitoring Utilization Description to the data listing. I additionally turned on the system permissions.
I’m creating the app with SwiftUI. Goal system runs ios 15.4.
Any concepts what else to attempt? Possibly that is associated to swiftUI?
Code:
DeckListView(decks: $retailer.decks){
Process {
....
}
}
}.onAppear{
requestPermission()
}
func requestPermission() {
DispatchQueue.important.asyncAfter(deadline: .now() + 2) {
if #accessible(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization { standing in
change standing {
case .licensed:
print("Licensed")
print(ASIdentifierManager.shared().advertisingIdentifier)
case .denied:
print("Denied")
case .notDetermined:
// Monitoring authorization dialog has not been proven
// at all times the case for me
print("Not Decided")
case .restricted:
print("Restricted")
@unknown default:
print("Unknown")
}
}
}
}
}
[ad_2]
