iOS应用ATT授权弹窗不显示问题求助
ATT授权弹窗始终不显示的问题排查
我开发的应用已提交至App Store审核,收到了关于App Tracking Transparency(ATT)的相关通知。于是我实现了AppTrackingManager类并编写了如下代码,同时在AppDelegate的didFinishLaunch方法中调用了requestPermission方法,但ATT授权弹窗始终无法显示。我已经在Info.plist中配置了相关参数,恳请帮忙定位并解决这个问题。
实现的代码:
import Foundation import AppTrackingTransparency import AdSupport class AppTrackingManager { static func requestPermission() { guard #available(iOS 14, *) else { return } ATTrackingManager.requestTrackingAuthorization { status in DispatchQueue.main.async { switch status { case .authorized: // Tracking authorization dialog was shown // and we are authorized QonversionManager.setAdvId() print(ASIdentifierManager.shared().advertisingIdentifier) print("ATT: Authorized") // Now that we are authorized we can get the I case .denied: // Tracking authorization dialog was // shown and permission is denied print("ATT: Denied") case .notDetermined: // Tracking authorization dialog has not been shown print("ATT: Not Determined") case .restricted: print("ATT: Restricted") @unknown default: print("ATT: Unknown") } } } } }
内容的提问来源于stack exchange,提问作者synecdochenoire
相关产品推荐
相关产品推荐

