Analysing Assets.Car File in iOS

Analysing Assets.car file in iOS

This tool can extract a .car archive: https://github.com/steventroughtonsmith/cartool

Steps to extract archive:

Once you've downloaded the zip from github, compile it in Xcode to generate the command line tool. Then expand the Products group and right click on the cartool file and locate it in finder. You can then run the tool like so:

  • open terminal
  • cd /path/to/cartool
  • ./cartool /path/to/Assets.car /path/to/outputDirectory

What is Assets.car file in .app?

It is the "compiled" version of the assets catalog.

Creating Assets.car file through command line for app resigning

You just need to use the name of your appiconset.

So in this example add:

 --app-icon AppIcons --output-partial-info-plist build/partial.plist

How does [UIImage imagedNamed:inBundle:compatibleWithTraitCollection:] actually access an image?

To your question, yes.

Asset.car is archived *.xcassets. Check this thread, you can unarchive it back to xcasset with the tool it mentioned: Analysing Assets.car file in iOS

How to reference images with different file extensions from XAML?

It is possible to reference images with different file extensions from XAML like this:

<Image>
<Image.Source>
<OnPlatform x:TypeArguments="ImageSource">
<OnPlatform.iOS><FileImageSource File="ic_cup_coffee.pdf"/></OnPlatform.iOS>
<OnPlatform.Android><FileImageSource File="ic_cup_coffee.png"/></OnPlatform.Android>
</OnPlatform>
</Image.Source>
</Image>

Anyhow, this does not solve our issue that the images are sometimes not visible. We stick with using <Image Source="ic_cup_coffee"/> and we will analyze if this bug is the root of the problem.



Related Topics



Leave a reply



Submit