gpt4 book ai didi

IDFA iOS14 返回被拒绝而不显示身份验证弹出窗口

转载 作者:行者123 更新时间:2023-12-04 11:05:55 30 4
gpt4 key购买 nike

我正在研究在 iOS 14 上获取 IDFA。我使用的是 iPhone 8 Plus。
我已经添加了

<key>NSUserTrackingUsageDescription</key>
<string>App would like to access IDFA for tracking purpose</string>
.plist文件。
然后添加
let type = ATTrackingManager.trackingAuthorizationStatus;
返回 .denied , 有
func requestPermission() {
ATTrackingManager.requestTrackingAuthorization { status in
switch status {
case .authorized:
// Tracking authorization dialog was shown
// and we are authorized
print("Authorized")

// Now that we are authorized we can get the IDFA
print(ASIdentifierManager.shared().advertisingIdentifier)
case .denied:
// Tracking authorization dialog was
// shown and permission is denied
print("Denied")
case .notDetermined:
// Tracking authorization dialog has not been shown
print("Not Determined")
case .restricted:
print("Restricted")
@unknown default:
print("Unknown")
}
}
}
但我收到 .denied没有任何弹出窗口。
你知道发生了什么吗?

最佳答案

在系统的设置应用程序中有一个选项“ 允许应用程序请求跟踪”,如果它关闭,requestTrackingAuthorization将返回 .denied立即地。
Privacy Setting

关于IDFA iOS14 返回被拒绝而不显示身份验证弹出窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62817164/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com