Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an info.plist key for advertising identifier use

Tags:

There is an entry for itsappusesnonexemptencryption (ITSAppUsesNonExemptEncryption export compliance while internal testing?), but is there one for the Advertising identifier, and if so, what is it?

like image 612
zugzwang Avatar asked May 23 '16 22:05

zugzwang


2 Answers

No, but you can use Felix Krause’s https://fastlane.tools to fully or partially automate whole Delivery process (incl. passing this stupid IDFA Radio Button blocker amongst others).

like image 173
igraczech Avatar answered Oct 30 '22 14:10

igraczech


No, there is nothing in the info.plist that's related to Advertising Identifier.

When you will submit the app to the App Store you'll need to check some things in order to inform Apple you are doing usage with the identifier. More details regarding that here:

https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html

Here is how to retrieve the Advertising Identifier:

Objective C -

@import AdSupport;

...

NSString *adId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];

Swift -

import AdSupport

...

let myIDFA: String?
    // Check if Advertising Tracking is Enabled
    if ASIdentifierManager.shared().isAdvertisingTrackingEnabled {
        // Set the IDFA
        myIDFA = ASIdentifierManager.shared().advertisingIdentifier.uuidString
    } else {
        myIDFA = nil
    }

(updated to Swift 3.0)

like image 37
L A Avatar answered Oct 30 '22 14:10

L A