問題詳述:
- 用xocde 8打包出現(xiàn)如下問題斩披,
ERROR ITMS-90682: "Invalid Bundle. The asset catalog at 'Payload/****.app/Assets.car' can't contain 16-bit or P3 assets if the app is targeting iOS releases earlier than iOS 9.3."
-
出現(xiàn)這個(gè)問題有兩種解決方法
- 1.修改最低版本號(hào)可是嘗試iOS8.1 ~iOS8.4之間溜族。(我只是看到網(wǎng)上有這個(gè)方法,但是并沒有解決雏掠,但是還試一下吧斩祭,萬一成了呢)
- 2.率復(fù)雜
- 導(dǎo)出項(xiàng)目的 ipa 文件
- 定位到該ipa文件使用解壓工具解壓 ,或者修改后綴名.ipa 為 .zip后直接解壓
- 解壓后會(huì)有Payload 文件夾乡话,里面會(huì)有你的APP文件
- 打開終端切換到你的app的Payload文件夾下的 .app bundle 文件夾內(nèi)摧玫,形式如下:(終端輸入cd 拖入Payload里面的文件,回車)
cd path/to/Payload/your.app
http://od2d96feb.bkt.clouddn.com/1.png
- 用 find 命令定位到 Assets.car 文件 .app bundle , 形式如下:
find . -name 'Assets.car'
http://od2d96feb.bkt.clouddn.com/2.png
- 使用 assetutil 命令找到任何包含著 16-bit or P3 的資源文件, 對(duì)每個(gè) Assets.car 執(zhí)行以下命令 :
sudo xcrun --sdk iphoneos assetutil --info /path/to/a/Assets.car > /tmp/Assets.json
- 如果在執(zhí)行sudo xcrun --sdk iphoneos assetutil這行命令的時(shí)候出現(xiàn)問題
>Assertion failed: (tokenCount < maxCountIncludingZeroTerminator - 1), function CUIRenditionKeySetValueForAttribute, file /BuildRoot/Library/Caches/com.apple.xbs/Source......有可能是裝了多個(gè)xocode绑青,打開xcode設(shè)置诬像, 修改command line tools 版本為xcode8 重新運(yùn)行即可闸婴。
http://od2d96feb.bkt.clouddn.com/3.png
- **/path/to/a/Assets.car** 替換為Assets.car文件的路徑, 如果你終端的位置依然在bundle下則直接執(zhí)行
xcrun --sdk iphoneos assetutil --info ./Assets.car >/tmp/Assets.json
http://od2d96feb.bkt.clouddn.com/4.png
- 打開Assets.json
open /tmp/Assets.json
- 開始查找"DisplayGamut" : "P3" 沒找到可以試試 P3邪乍, BitsPerSample,然后記下圖片的名稱庇楞。
- 使用ps或者等圖片處理工具,把圖片保存成sRGB即可