Guideline 2.1 – Information Needed
We’re looking forward to completing our review, but we need more information to continue. Your app uses the AppTrackingTransparency framework, but we are unable to locate the App Tracking Transparency permission request when reviewed on iOS 17.5.1.
问题原因:
第一次打开应用时,本应该弹窗的ATTrackingManager权限询问对话框未能正确弹出,主要原因在于网络权限询问框、消息权限询问框的弹出,导致其未能正常弹出。
解决办法:
import AppTrackingTransparency
...
let timer = Timer.publish(every: 3, tolerance: 0.5, on: .main, in: .common).autoconnect()
...
.onReceive(self.timer.dropFirst()) { _ in
if ATTrackingManager.trackingAuthorizationStatus == .notDetermined {
ATTrackingManager.requestTrackingAuthorization { status in
switch status {
case .notDetermined: Dlog("用户尚未做出选择")
case .restricted: Dlog("跟踪受限")
case .denied: Dlog("用户拒绝跟踪")
case .authorized: Dlog("用户已授权跟踪")
@unknown default: Dlog("unknown")
}
}
} else {
self.timer.upstream.connect().cancel()
}
}
主要思路:
通过循环调度方式强制弹出,如果用户已经做出对应授权,则终止该调度。
推荐应用:橙子复利计算器
https://apps.apple.com/app/id1615745833