且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如果应用支持 iOS 8 或更早版本,Assets.car 不能包含 16 位或 P3 资产?

更新时间:2023-12-04 15:55:16

简而言之:您的捆绑包中存在格式不受支持的图片.您可以调整这些图像的格式或增加目标的最低 iOS 版本.请记住,后者只是一个修补程序,可能不是您想要做的,因为它会因为一个非常可解决的问题而减少您的潜在用户群.

第 1 部分将解释如何找出哪些图片是违规的.

第 2 部分向您展示如何调整图片格式,以便 iTunesConnect 满意.如果您只有少量图像,您可以跳到第 2 部分并手动检查它们.

第 1 部分:识别违规图片:

Apple 开发者论坛对此有一个主题:

我不知道哪些配置文件正确,哪些不是,但我的Adobe RGB (1998)"肯定被拒绝了.所以我使用了颜色同步实用程序"(OSX 自带).(右击图片,打开方式...)

现在您可以在底部指定不同的颜色配置文件:

现在,如果您再次检查图像,它应该如下所示:

现在替换您之前的图像并重试.这对我有用,我希望这对你有帮助.

Has anyone come across this error when uploading to iTunesConnect. Upload precess gets to "Verifying assets with iTunes store" the I get the following error:

I am working with xCode8, embedding a custom sticker app within an existing iOS application. I have temporarily removed sticker assets and included apple sample message icons to test if it was my sticker assets that were causing the issue, however when validating I receive the same error. Any thoughts?

In short: There are pictures in your bundle that have a non-supported format. You can either adjust the format of these images or increase your minimum iOS version of your target. Keep in mind that the latter is only a hotfix and probably not what you want to do, because it would decrease your potential user base because of a very solvable problem.

Part 1 will explain how to find out which pictures are the offending ones.

Part 2 shows you how to adjust the picture format so that iTunesConnect is happy with it. If you only have a handful of images, you can skip to Part 2 and check them manually.

Part 1: Identify the offending images:

The Apple Developer Forum has a thread on this: https://forums.developer.apple.com/thread/60919

The accepted solution is as follows:

How to resolve "ERROR ITMS-90682: Invalid Bundle - The asset catalog at 'Payload/XXXXX/Assets.car' can't contain 16-bit or P3 assets if the app supports iOS 8 or earlier."

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: 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

  1. Use the find tool to locate Assets.car files in your .app bundle as shown below: find . -name 'Assets.car'

  2. 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

  3. 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.

  4. Replace those assets with 8-bit / sRGB assets, then rebuild your app.

Part 2: Adjust the color profile of the images to play nice with iTunesConnect

Open the "Information" of the offending file (CMD+I). Check your color profile.

I don't know which profiles exactly are fine and which are not, but my "Adobe RGB (1998)" certainly got rejected. So I used "Color Synch Utility" (comes with OSX). (Right click on the image, open with...)

Now at the bottom you have the possiblity to assign a different color profile:

Now if you inspect your image again it should look like this:

Now replace your previous image(s) and try again. This worked for me, I hope this helps you.