Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make an iOS asset bundle?

Tags:

ios

assets

bundle

I saw a custom asset bundle in an iOS project I evaluated, so at least I know it's possible.

My issue is that I'm using a CATiledLayer with about 22,000 tiles for a given image and it takes a very long time to compile (half an hour clean build, 5-10 minutes for regular build). So, I want to take all of the images and make a custom bundle to make it portable and hopefully not recompile into the app bundle each time.

How do I go about this? I checked the docs, but didn't see an explanation on how to actually create the bundle.

like image 203
michael Avatar asked Feb 03 '11 15:02

michael


People also ask

What is an iOS bundle?

A bundle is a directory in the file system that groups executable code and related resources such as images and sounds together in one place. In iOS and OS X, applications, frameworks, plug-ins, and other types of software are bundles.


1 Answers

Answer is stupidly simple

Make a folder in finder, add files to it, rename it to bundlename.bundle

drag into Xcode - success!

to access, use the form of PathToMainBundle+"/bundlename.bundle"

like image 169
michael Avatar answered Nov 10 '22 10:11

michael