• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Xcode 8 Assets.car "16-bit" gotcha and solution.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Xcode 8 Assets.car "16-bit" gotcha and solution.


  • Subject: Xcode 8 Assets.car "16-bit" gotcha and solution.
  • From: Alex Zavatone <email@hidden>
  • Date: Thu, 27 Oct 2016 14:28:08 -0500

This is an FYI for any of you out there using asset libraries in your iOS projects on Xcode 8.

I would make sure that you run a validate on your IPA to find out if this will be an issue for you now, rather then when you need to submit your app, it gets uploaded and then rejected after a 20 minute upload to iTunes Connect.

If you get this message:

Assets.car can't contain 16-bit or P3 assets if the app supports iOS 8 or earlier



Please note that what you think 16-bit means and what that error message thinks 16-bit means are two completely different things.

Two weeks I looked into this and I followed the helpful info at the link below

http://stackoverflow.com/questions/39228601/assets-car-cant-contain-16-bit-or-p3-assets-if-the-app-supports-ios-8-or-earlie

And I knew that we had no 16 bit images because 
1, I made all of those that were new and 
2, all the old ones were 8 bit without alphas and 
3, I have no idea what the hell a p3 asset is and I'm sure I didn't create one.

But with the GMC of Xcode 8.1 spied up on the developer portal yesterday, I decided to take a stab at this again.

Sure enough.  The validation on the IPA reported that same error, but did not list the files that were in error : /  

Following the directions at the link above, with the assets.car file being decoded into an assets.json, I saw a few things.

FRIENDLY TIP IF YOU HAVE THIS PROBLEM: drop your Assets.car file either at your HD/SSD root or at the root of your user folder and paste the appropriate one of these lines below into the terminal:

sudo xcrun --sdk iphoneos assetutil --info ~/Assets.car > ~/Assets.json

sudo xcrun --sdk iphoneos assetutil --info /Assets.car > /Assets.json

After you run run the command, you will see output indicating that something is wrong, but again, the tool will not tell you which file has the problem.  Seriously?  Who thought that was a good idea? > : [

Now, here's the fine point that was not addressed in the link above and what can lead to a misleading error message.

Open and search the Assets.json file and search for all occurrences of these strings and see what the resulting amounts are.

"BitsPerSample" : 8,
"BitsPerSample" :
"BitsPerSample" : 16,

Note that this is BitsPerSample, not BitsPerPixel.  This was my major oversight.  In reading "16-bit" in the error message, it was assumed that the error was about 16 bit per pixel images - because I had never heard of "16 bits per" applying to anything else with regards to images.

As it happened, there are no images that are 16 bits per pixel, but as for BitsPerSample, there they are

  {
    "PixelWidth" : 101,
    "ColorModel" : "RGB",
    "SizeClass Vertical" : "universal",
    "PixelHeight" : 101,
    "Name" : "Connection Status - Connected",
    "Scale" : 1,
    "Idiom" : "universal",
    "BitsPerSample" : 16,
    "Encoding" : "ARGB",
…
  {
    "PixelWidth" : 100,
    "ColorModel" : "RGB",
    "SizeClass Vertical" : "universal",
    "PixelHeight" : 104,
    "Name" : "Connection Status - Disconnected",
    "Scale" : 1,
    "Idiom" : "universal",
    "BitsPerSample" : 16,
    "Encoding" : "ARGB",

Looking at these images in the Finder, they clearly were not 16 bit images, but 8.  Looking at them in Preview showed the same thing.  But here's where the difference lied.

I had created these images in Illustrator and exported them and rescaled them in Preview.  
When them scaling down, I left two out of the 4 images at 150 pixels per inch, instead of 72.  
When these were compiled in the asset library, that ended up creating these "16-bit" assets that Xcode 8 was complaining about.

So, the error message isn't necessarily about 16 bit images as we traditionally know them and even when creating 8 bit images, it's possible that they will be represented as 16 bit per sample images.

If you get this error and you know you don't have any 16 bit images, check if any of your images' resolution is over 72 DPI.

Here's the info from Preview

File contained within: Connection Status - Connected.imageset
Color Model: RGB
Depth: 8
DPI Height: 150.01
DPI Width: 150.01
Has Alpha: 1
Pixel Height: 101
Pixel Width: 101
Profile Name: Adobe RGB (1998)


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode 8 Assets.car "16-bit" gotcha and solution.
      • From: David Duncan <email@hidden>
References: 
 >Downgrading Xcode version (From: Doug Hill <email@hidden>)
 >Re: Downgrading Xcode version (From: Alex Zavatone <email@hidden>)
 >Re: Downgrading Xcode version (From: Doug Hill <email@hidden>)
 >Re: Downgrading Xcode version (From: Doug Hill <email@hidden>)
 >Re: Downgrading Xcode version (From: Marco S Hyman <email@hidden>)
 >Re: Downgrading Xcode version (From: Doug Hill <email@hidden>)
 >Re: Downgrading Xcode version (From: Alex Zavatone <email@hidden>)
 >Re: Downgrading Xcode version (From: Doug Hill <email@hidden>)
 >Re: Downgrading Xcode version (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Mass of weird errors
  • Next by Date: Re: My god, it is so pleasant with the animations disabled on Sierra.
  • Previous by thread: Re: Downgrading Xcode version
  • Next by thread: Re: Xcode 8 Assets.car "16-bit" gotcha and solution.
  • Index(es):
    • Date
    • Thread