Possible to create apps that store data on the iphone and load them at runtime?


im about creating an unity iphone app and need to work with lots of 480x320px images. At the moment ive imported about 72 pictures as 512x512 textures, so unity can compress them. After building that iphone-app, i looked into the "Editor.log"-files to know which complete size my project has and im about 11 MB now.

After building and starting the performance tools with xcode (run-run with performance tool-activity monitor) it shows about 26 MB of "real memory" and runs great. Ive tested it with more images and by more than 40MB, the app crashed down.

My questions:

  • Where does the size-difference from 15 MB comes from?
  • Can i build assets with any desired amount of images that will be stored on the iphone but will be loaded (with the WWW-class) at runtime when needed ?

(For example a navigation-app has about more than 700MB if you download it from the appstore, but if you start that app, it has to work under the 40MB ive mentioned above. Is that right?)

Thanks for your time and help.

I'll answer the question in the title not the body of your question. Yes you can store files of arbitrary size in the file system. You can get them into the file system either by including them in your xCode project or downloading them with WWW class. Use .Net usual file classes to work with them.

  1. 15 MB = ~10+ MB for application binary code + something for .NET heap + something for engine internals + some other stuff.
  2. You can put your resources into "Resources" folder and load them later via Resources.Load() function.