简体   繁体   中英

Is there an info.plist key for advertising identifier use

有一个条目是其应用程序加密( 内部测试时ITSAppUsesNonExemptEncryption导出合规性吗? ),但广告标识符是否存在,如果有,它是什么?

不,但您可以使用Felix Krause的https://fastlane.tools全部或部分自动化整个交付流程(包括传递这个愚蠢的IDFA单选按钮拦截器等)。

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM