How to analyse and extract an Assets.car file in iOS
Codemia Knowledge Hub ·
An Assets.car file is the compiled, binary form of an app's Asset Catalog, so you cannot open it like a folder of images. To see or extract what is inside, use a viewer such as Asset Catalog Viewer or a command-line extractor such as cartool. This is useful both for reverse engineering and for managing assets in your own apps.
What a .car file contains
Xcode compiles the assets in an Asset Catalog into this format for better performance and less space:
- Efficiency: storage and retrieval are optimized for runtime.
- Binary format: hard to edit directly.
- Multiple scales and idioms: it holds assets for different device sizes and screen scales.
The structure is largely proprietary, but several tools and methods can read its contents.
Asset Catalog Viewer (GUI)
This GUI tool analyzes and extracts the content of .car files:
- Previews: view assets directly in the app.
- Exporting: export assets to disk.
- Annotations: add descriptions or notes to assets.
cartool (command line)
cartool, originally written by Steven Troughton-Smith, is a command-line utility that extracts assets from .car files.
- Installation: clone the repository, then open
cartool.xcodeprojin Xcode and build it. The code is old and may need small source fixes before it compiles on current Xcode versions.
- Usage: pass the archive and an output directory, and cartool writes each image it finds there:
To list what an archive holds without extracting it, Xcode's assetutil --info Assets.car prints JSON metadata for every asset.
Analysing the file by hand
Without a tool, you have to understand the file structure, read the binary data and decode the image payloads yourself. A hex editor helps to visualize the bytes and work out offsets.
Asset variants inside a .car file
- Multiple resolutions: resources for different screen resolutions (1x, 2x, 3x).
- Device-specific assets: images tailored for iPhone, iPad or other Apple devices.
- Localized resources: assets for different locales without bloating app size.
Wrapping many images in a single file reduces memory overhead and loads faster than uncompiled resources. If you extract assets from apps you do not own, make sure you comply with copyrights and Apple's terms.
Related reading
- Android- ErrorExecution failed for task 'apptransformClassesWithDexForRelease
- Android- Thread.join causes Application to hang
- Android - Adding at least one Activity with an ACTION-VIEW intent-filter after Updating SDK version 23
- Android - border for button
- Android - Emulator in landscape mode, screen does not rotate
- Android - Handle Enter in an EditText
- Android - how to make a scrollable constraintlayout?
- Android - How To Override the Back button so it doesn't Finish my Activity?
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseNo course covers this one yet
Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.
Build my courseData Structures & Algorithms practice on Codemia
Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.