Search code examples
swiftuuidadsprivacy

swift idForVendor, advertisingIdentifier


Is it possible to get and send advertisingIdentifier and/or idForVendor when some action takes place? For example user push button, and I write something like:

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    
}

Is it ok with Apple privacy terms?


Solution

  • I'd suggest reading Apple's App Store Review Guidelines, especially the section on Privacy:

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

    In the intro:

    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.

    The Apple Developer Program License Agreement has quite a bit to say about the Advertising Identifier:

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

    Section 1.2:

    is to be used solely for advertising purposes

    Section 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.

    Section 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.

    Section 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.

    Bottom Line: don't mess around with user privacy. It's a breach of trust with your users, and it may get your app rejected or pulled, or get you banned.