libにもあるぞ!気をつけろ!

2014年3月4日

本日、業務でApp Storeへの申請を行う作業が発生しまして、アプリをアップロードしようと思ったところ、
以下のようなメッセージで怒られてしまった。

Non-public API usage:
Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice.
Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6.
If method names in your source code match the private Apple APIs listed above,
altering your method names will help prevent this app from being flagged in future submissions.
In addition, note that one or more of the above APIs may be located in a static library that was included with your app.
If so, they must be removed.
If you think this message was sent in error and that you have only used Apple-published APIs in accordance with the guidelines,
send the app's nine-digit Apple ID, along with detailed information about why you believe the above APIs were incorrectly flagged,
to appreview@apple.com. For further information, visit the Technical Support Information page.

何々、最底辺のオメーはUIDeviceのuniqueIdentifierメソッドを使ってるだろ??
そんなの許されてねーんだよ。文句があるなら、appreview@apple.comに連絡しろ。ってことらしい。
おいおい、待てよ。俺じゃないけど、ちゃんとうちのプログラマー様がソースコードチェックして
修正してくれているぞ。俺だって、Xcodeから、今探したけど、そんなもなのは使ってませんぜ。
そりゃあ無いよ、御代官様。
ってことで、アップルに文句の一つでも言ってやろうと思ったのですが、そこは最底辺、絶対にどこか抜けているところがあるはずと思い返してみた。
半日ほど、悩みに悩んだ挙句、あれ?もしかしてコードになくても取り込んでいるライブラリにあったら
引っかかるんじゃね?それだ!!
しかし、それはどうやって調べるんだ。と悩みつつググってみると、あった!!
http://blog.dalt.me/170
意味はようわからんが、このコマンドでうまく探してくれるようだ。

find . |grep -v .svn |grep "\.a" | grep -v "\.app" | xargs grep uniqueIdentifier

いやあ、助かりました。この件の失態でまた一歩、クビに近づいた最底辺でした。

Objective-c

Posted by koheizi