轉載於:http://blog.csdn.net/iunion/article/details/9045573
剛剛更新過的代碼出現了問題,在上傳之前的驗證就不通過,提示 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。於是很糾結怎么解決這個問題。查詢后才知道蘋果剛剛修改了上傳的規則,而且很嚴厲的執行,不允許有任何UUID的代碼,看來是要100%將UUID從AppStore上絕跡啊。弄了兩個小時解決的方法,給出我的解決辦法
1.在xcode的工程代碼中全局搜索uniqueIdentifier,搜索到的代碼要去掉,或者用其他的方法替換掉。
2.第二個可能就是代碼中引用的.a文件中可能用到了UUID,這個也是不能通過的,解決辦法:
1>首先打開終端,cd到工程根目錄;
2>輸入命令 find . -name "*.a",這個命令過后就會將工程中用到的.a文件全部列出來,類似這種
./DMOfferWallSDK/libDomobOfferWallSDK.a
./DomobAdSDK/libDomobAdSDK.a
./libDianRuAdWall.a
./libFlurry.a
./libYouMi.a
3>然后輸入命令 strings ./DMOfferWallSDK/libDomobOfferWallSDK.a | grep unique ,命令的紅色部分,依次換成上面的列出的.a文件,一旦有不符合UUID使用的.a文件,遇到這個命令后會有如下顯示結果出現:uniqueIdentifier,然后將相應的SDk去掉,或者換上最新的版本,同樣的方法確認沒有用到UUID