P3图片导致IOS 9.1 9.2系统崩溃
2017-09-30 本文已影响65人
Hyukooooh
这两天app上了新版本,通过bugly统计后台,发现崩溃出现爆发性增长。打开一看
1506762500470.jpg 478CE242-2001-432F-B0D3-B2D4B1D463C3.png
这尼玛是什么鬼,全都没见过啊! 还这么多 仔细一看崩溃系统全是9.0 9.1 9.2的。
有不少的用户打电话过来投诉,啊,我的那个烦啊!测试机怎么测都重现不了,同事朋友又没人有同版本的真机。 赶紧查资料找人问。最后在网上看到相似的情况。主要原因是因为打的包里含有p3图片
尝试了一下
1. Create an Inspectable .ipa file. In the Xcode Organizer (Xcode->Window->Organizer), select an archive to inspect, click “Export...", and choose "Export for Enterprise or Ad-Hoc Deployment". This will create a local copy of the .ipa file for your app.
2. Locate that .ipa file and change its the extension to .zip.
3. Expand the .zip file. This will produce a Payload folder containing your .app bundle.
4. Open a terminal and change the working directory to the top level of your .app bundle
cd path/to/Payload/your.app
5. Use the find tool to locate Assets.car files in your .app bundle as shown below:
find . -name 'Assets.car'
6. Use the assetutil tool to find any 16-bit or P3 assets, in each Assets.car your application has as shown below. :
sudo xcrun --sdk iphoneos assetutil --info /path/to/a/Assets.car > /tmp/Assets.json
7. Examine the resulting /tmp/Assets.json and look for any contents containing “DisplayGamut": “P3” and its associated “Name". This will be the name of your imageset containing one or more 16-bit or P3 assets.
8. Replace those assets with 8-bit / sRGB assets, then rebuild your app.
中文版
1159872-7984c726748019e1.png目前等待手机验证!!