swift idForVendor,广告标识符

swift idForVendor, advertisingIdentifier

是否可以在某些操作发生时获取和发送广告标识符 and/or idForVendor?例如用户按钮,我这样写:

let advertisingIdentifier: NSUUID!
@IBAction func buttonPressed(sender: AnyObject) {
    print("You clicked the button")
    let addId = advertisingIdentifier().UUIDString
    let buttonIsPushedId = "THISBUTTONID"
    //send addId (my advertisingIdentifier) and buttonIsPushedId on some server    
}

Apple 隐私条款可以吗?

我建议阅读 Apple 的 App Store 审核指南,尤其是关于隐私的部分:

https://developer.apple.com/app-store/review/guidelines/#privacy

简介中:

If you attempt to cheat the system (for example, ...steal data from users, ...your Apps will be removed from the store and you will be expelled from the developer program.

Apple Developer Program License Agreement 对广告标识符有很多规定:

http://adcdownload.apple.com/Documentation/License_Agreements__Apple_Developer_Program/Apple_Developer_Program_Agreement_20150728.pdf

第 1.2 节:

is to be used solely for advertising purposes

第 3.3.9 节:

You may not use analytics software in Your Application to collect and send device data to a third party. Further, neither You nor Your Application will use any permanent, device-based identifier, or any data derived therefrom, for purposes of uniquely identifying a device.

第 3.3.12 节:

You and Your Applications (and any third party with whom You have contracted to serve advertising) may use the Advertising Identifier, and any information obtained through the use of the Advertising Identifier, only for the purpose of serving advertising. If a user resets the Advertising Identifier, then You agree not to combine, correlate, link or otherwise associate, either directly or indirectly, the prior Advertising Identifier and any derived information with the reset Advertising Identifier.

第 3.3.13 节:

For Applications compiled for any iOS version providing access to the Ad Support APIs: - You agree to check a user’s Advertising Preference prior to serving any advertising using the Advertising Identifier, and You agree to abide by a user’s setting in the Advertising Preference; and - If a user has set their Advertising Preference to limit ad tracking, You may use the Advertising Identifier, and any information obtained through the use of the Advertising Identifier, only for Limited Advertising Purposes.

底线:不要乱用用户隐私。这违反了用户的信任,可能会导致您的应用被拒绝或下架,或者被封禁。