菜鸟教程小白 发表于 2022-12-12 12:06:58

ios - Xcode 8 发布 App 崩溃?


                                            <p><p>将构建上传到 App Store 时出现错误:</p>

<blockquote>
<p>&#34;Invalid Bundle. The asset catalog at &#39;$path&#39; can&#39;t contain 16-bit or P3 assets if the app is targeting iOS releases earlier than iOS 9.3&#34;</p>
</blockquote>

<p>之前我上传到Beta测试就好了,我的部署目标是8.3。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>这个答案正是你的问题的解决方案</p>

<p> <a href="https://stackoverflow.com/a/39453818/1271424" rel="noreferrer noopener nofollow">https://stackoverflow.com/a/39453818/1271424</a> </p>

<p>您需要找到所有 P3 资源,然后将它们转换为 sRGB 颜色空间(使用任何图像编辑器)。这是原始答案:</p>

<blockquote>
<p>With Xcode 8 GM, this error will occur if you include 16-bit or P3
assets in an app submission targeting iOS releases earlier then iOS
9.3. If your app requires wide color functionality you must change your Deployment Target to iOS 9.3 or later. If your app does not
require wide color functionality and you wish to deploy it to older
iOS versions then you should replace all 16-bit or P3 assets with
8-bit sRGB assets.   You can find 16-bit or P3 assets by running
“assetutil” on the asset catalog named in the error message from
iTunes Connect. The following steps outline the process:</p>

<ol>
<li><p>Create an Inspectable .ipa file.In the Xcode Organizer (Xcode-&gt;Window-&gt;Organizer), select an archive to inspect, click
“Export...&#34;, and choose &#34;Export for Enterprise or Ad-Hoc Deployment&#34;.
This will create a local copy of the .ipa file for your app.</p></li>
<li><p>Locate that .ipa file and change its the extension to .zip.</p></li>
<li><p>Expand the .zip file. This will produce a Payload folder containing your .app bundle.</p></li>
<li><p>Open a terminal and change the working directory to the top level of your .app bundle cd path/to/Payload/your.app</p></li>
<li><p>Use the find tool to locate Assets.car files in your .app bundle as shown below: find . -name &#39;Assets.car&#39;</p></li>
<li><p>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 &gt; /tmp/Assets.json</p></li>
<li><p>Examine the resulting /tmp/Assets.json and look for any contents containing “DisplayGamut&#34;: “P3” and its associated “Name&#34;.This will
be the name of your imageset containing one or more 16-bit or P3
assets.</p></li>
<li><p>Replace those assets with 8-bit / sRGB assets, then rebuild your app.</p></li>
</ol>

<p>Update:If your Deployment Target is set to either 8.3 or 8.4 and you have an
asset catalog then you will receive this same error message, even if you do not
actually have 16-bit or P3 assets.In this case you will either need to lower
your Deployment Target to 8.2, or move it up to 9.x. </p>
</blockquote></p>
                                   
                                                <p style="font-size: 20px;">关于ios - Xcode 8 发布 App 崩溃?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/39552134/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/39552134/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - Xcode 8 发布 App 崩溃?