前陣子公司的 App 就因为这个问题被蘋果退回。看起來是近期才收緊的條款——上一個版本同樣含有相關程式碼,卻順利過關了。如果你最近準備送審,強烈建議先自行檢查一遍。
Program License Agreement
PLA 3.3.12We found your app uses the iOS Advertising Identifier but does not include ad functionality. This does not comply with the terms of the iOS Developer Program License Agreement, as required by the App Store Review Guidelines.
Specifically, section 3.3.12 of the iOS Developer Program License Agreement states:
"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."
Note: iAd does not use the AdSupport framework, ASIdentifierManager, or the Advertising Identifier. Therefore they are not required for iAd implementations and should not be included in your app for iAd support.
Please check your code - including any third-party libraries - to remove any instances of:
class: ASIdentifierManager
selector: advertisingIdentifier
framework: AdSupport.frameworkIf you are planning to incorporate ads in a future version, please remove the Advertising Identifier from your app until you have included ad functionality.
To help locate the Advertising Identifier, use the "nm" tool. For information on the "nm" tool, open a terminal window and enter, "man nm."
If you do not have access to the libraries' source, you may be able to search the compiled binary using the "strings" or "otool" command line tools. The "strings" tool lists the methods that the library calls, and "otool -ov" will list the Objective-C class structures and their defined methods. These techniques can help you narrow down where the problematic code resides.
你的 App 裡出現了廣告識別符相關的符號,但實際上並沒有廣告功能。蘋果的邏輯是:IDFA 只能用在投放廣告這個目的上,有符號卻沒功能,就不符合開發者計畫授權條款。
值得注意的是,iAd 走的是自己的實作路徑,並不使用 AdSupport.framework、ASIdentifierManager 或 Advertising Identifier。也就是說,即使你真的接的是 iAd,也不該在專案裡出現這些符號。
蘋果在信末其實把方法都寫清楚了,實務上依序做這幾件事:
ASIdentifierManager 或 advertisingIdentifier。nm 列出符號表,或在終端輸入 man nm 查用法;拿不到原始碼的靜態庫,則可用 strings 列出該庫呼叫的方法名稱,或用 otool -ov 印出 Objective-C 類別結構與其定義的方法,藉此縮小範圍。找到元凶後,最乾淨的做法是升級到不含該 API 的 SDK 版本,或直接移除。若日後確實計畫加入廣告,蘋果的建議是先把 IDFA 拿掉,等廣告功能真正上線再加回來——這比每次送審都賭一次運氣要省事得多。