swift
func requestIDFA() {
if #available(iOS 14.5, *) {
ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
debugPrint("\(status)")
// Tracking authorization completed. Start loading ads here.
// loadAd()
})
} else {
// Fallback on earlier versions
}
//if #available(iOS 11.3, *) {
// SKAdNetwork.registerAppForAdNetworkAttribution()
//} else {
// Fallback on earlier versions
//}
}
网友评论