You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.21 21:48:21