itsappusesnonexemptEncryption 有一个条目(ITSAppUsesNonExemptEncryption 内部测试时的导出合规性?),但是是否有一个用于广告标识符的条目,如果有,它是什么?
不,但您可以使用 Felix Krause 的 https://fastlane.tools 完全或部分自动化整个交付过程(包括传递这个愚蠢的 IDFA 单选按钮拦截器等)。
不,info.plist 中没有任何与广告标识符相关的内容。
当您将应用程序提交到 App Store 时,您需要检查一些事项,以便通知 Apple 您正在使用该标识符。有关于此的更多详细信息,请参见此处:
以下是如何检索广告标识符:
目标C -
@导入AdSupport;
...
NSString *adId = [[[ASIdentifierManager共享管理器]广告标识符] UUIDString];
斯威夫特-
导入广告支持
...
let myIDFA: String?
// Check if Advertising Tracking is Enabled
if ASIdentifierManager.shared().isAdvertisingTrackingEnabled {
// Set the IDFA
myIDFA = ASIdentifierManager.shared().advertisingIdentifier.uuidString
} else {
myIDFA = nil
}
(更新至Swift 3.0)
接受的答案已过时。
从 iOS 14 开始,现在应该将 NSUserTrackingUsageDescription 条目添加到信息 plist 中才能访问广告 ID。否则应用程序崩溃并显示:
[access] This app has crashed because it attempted
to access privacy-sensitive data without a usage
description. The app's Info.plist must contain an
NSUserTrackingUsageDescription key with a string
value explaining to the user how the app uses this
data.