LoginSignup
83
81

More than 5 years have passed since last update.

【追記あり】ASIdentifierManager の advertisingIdentifier を使っているとリジェクトされる問題

Last updated at Posted at 2014-02-06

概要

2014年に入ってから、ファーストパーティかサードパーティかは問わず、 ASIdentifierManager の advertisingIdentifier を用いている場合に、リジェクトされる事例が報告されている。

ってか、ウチもご多分に漏れずリジェクトされたよっ!二回もっっ!!

詳細

普通にいつも通りアプリを App Store へ申請したところ、数日後に以下のようなメッセージと共に Reject という見たくないステータスになった。

PLA 3.3.12

We 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."

Please check your code - including any third-party libraries - to remove any instances of:

class: ASIdentifierManager
selector: advertisingIdentifier
framework: AdSupport.framework

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

すごーく端的に言えば「 広告を表示する機能が無いのに ASIdentifierManager の advertisingIdentifier を使ってるのはアウトだよー!」というコトらしい。

ここからは推測だが、Apple の中の人は strings, otool, nm あたりのコマンドを駆使して、申請されたバイナリの中身までチェックしているようだ。
class, selector, framework を指定しているところからみて、「文字列として含まれていたらアウト」というホド乱暴では無いと思うが、用心はしたい。
(例えば nil を返却するように修正した [HogeFuga get_advertisingIdentifier] みたいなメソッドがあった場合にどうなるかは未検証)

実際、弊社では一部のアプリを Unity を用いて開発しているわけだが、iOS 版をビルドする際に Unity が生成するコード内に、「 利用如何を問わず 上記の値を取得するためのメソッド」が書き出されてしまうので、ほぼ間違いなくリジェクトされるっぽい。

また、確認出来ている範囲で言うと、下記の SDK たちも advertisingIdentifier を利用しているらしいので、これらを使っている場合はリジェクトされるっぽい。
※2014/02/06 現在の情報です

  • Facebook SDK
  • Flurry
  • TestFlight SDK
  • Google Analytics

更に、ほぼ間違いなく、数多ある CPI 広告系の成果計測用 SDK も advertisingIdentifier を用いているハズなので、利用している場合は広告代理店に問い合わせを行った方が良さそうだ。
ってか、ウチは問い合わせた。

対応

んで、「じゃぁ、どうすんのよ?」って話ですよ。

既に私は答えを見付けています。

その答えとは………?

advertisingIdentifier を使わないっ!!

………。

いや、まぁ、「フザケンナっ!!」って話なのは重々承知してますよ?ええ。

でも、マジで「広告表示機能を突っ込む」か「IDFA を使わない」の何れかしか対応方法ない気がしています。

実際、各 SDK の開発元に問い合わせを行ったところ、「対応出来るかどうかは別として対応を検討している」という回答が得られたところもあるので、SDK 側の修正を待ちつつ、公開を急ぐなら、一旦 SDK を外して、申請するしか手は無さそう。
あ、勿論、自前のコードから除去はする前提ね。

Unity に関して

Unity の オフィシャルフォーラムで中の人が言及 しているとおり、Unity が吐き出すコードを修正すれば OK らしい。

ビルドの度に毎回書き換えるのが面倒な場合は PostProcessBuild とかで頑張って書き換えるコードを書くか、Trampoline 自体を修正しちゃうのも手かな?
Mac の場合 /Applications/Unity/Unity.app/Contents/PlaybackEngines/iPhonePlayer/iPhone-Trampoline/Classes/Unity/DeviceSettings.mm に当該ファイルの元ネタがあるので、コイツを修正しちゃえば OK かと。
アプリの Bundle 内にあるファイルなので、Unity 本体のアップデートの時とかに書き換えられちゃうから注意。
まぁ、次のアップデートに今回の問題への対応が含まれると思われるので、問題は無いけどね。

参考

参考までに、色々調べたときの各所の URL をメモっておく。

  • TechCrunch
    • オレが調べた際に、一番最初に見たページ。
  • StackOverflow
    • みんな大好き StackOverflow でもいち早く炎上しておりましたw
    • SDK の情報とかもそれなりに載ってる。
  • Unity Forum
    • 中の人のありがたい解説。
  • 強火で進め
    • Unity Forum の内容を噛み砕いて日本語で説明してくれてる。
    • いつもお世話になってます!!!
  • Google Groups (Google Analytics Product Forum)
    • Google Analytics も例外に漏れず該当しているようですな。

今後も何か動きがあれば報告していく所存なり。

追記

2014/02/10 (Mon) 10:30

上記 SDK (Facebook SDK, Google Analytics, Flurry) を全て削除し、Unity の Trampoline も修正した状態でビルドして、2014/02/07 に申請してみたところ、まさかの即日 In Review からの、翌日には 審査通過 という結果になった!ひゃっほぉぉぅ!!!
まぁ、有料アプリだったので、その辺が多少加味されるのかも知れないけどね。

なお、申請したバージョンに於いて advertisingIdentifier について調べてみたところ

strings
$ strings HogeFuga | grep advertisingIdentifier`
UnityEngine.iPhone::get_advertisingIdentifier

という結果になったので、純粋な文字列比較で見ているわけではなく、ちゃんとシンボルテーブルとか見てくれているっぽい。

あ、ちなみに、 strings の簡単な使い方としては、以下の手順が良いんじゃないかな?

  1. AdHoc ビルドした ipa ファイルを何処かに配置
  2. 拡張子を .ipa から .zip に変更
  3. 展開して生成されたディレクトリ内にある HogeFuga.app (実体はディレクトリ) に Terminal で移動
  4. 実行ファイル (バイナリ) があるので、そいつに対して strings コマンドを叩き付ける
    • まぁ、大量に表示されて目視できるワケないので、 grep するのが定石なのかな?

Apple 様的には、 nm とか otool とか使えって言ってきてるけど、 man ページ見てもイマイチ使い方が分からんので、その辺は詳しい人に説明を譲るw

2014/02/10 (Mon) 16:30

Flurry に関して、v4.3.2 にて IDFA 問題に関する対応が完了したらしい。

Addressed issue related to referencing IdentifierForAdvertisers that could lead to app being flagged during Apple review process.

リリースノートには下記のように記載されているが、実際リジェクトされないかどうかはまだ検証できていない。

2014/02/13 (Thu) 16:00

上記、Flurry の v4.3.2 を突っ込んで、他の Third Party SDK を全て排除した状態で申請したところ、見事に 審査通過 した!!!

他の SDK に関しては未検証なので、情報お持ちの方が居ればコメント欄とかでお教えいただけると助かります〜^^

2014/03/07 (Fri) 16:30

友人の SparklerApps に依ると、Google Analytics for iOS も対応したらしい。

完全に聞いた内容そのままコピペするだけだが、pod 使う場合は pod "GoogleAnalytics-iOS-SDK", "3.0.3c" で行けるそうな。

2014/04/10 (Thu) 18:30

今日とあるアプリを申請しようと思って、ボタンをポチポチする簡単なお仕事してたら、 Ready to Upload Binary する際の質問事項に IDFA 関連の質問が増えているコトを確認した。

詳しくは こちら の記事をご参照くださいな。(ステマ)

83
81
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
83
81