开发者

Best practices for packaging resources (jpg's, sound, video) in an iPhone app?

开发者 https://www.devze.com 2022-12-28 09:12 出处:网络
I\'m a newb iPhone developer writing an app that has several large JPGs and sound files. Everything works ok if I drag these non-code resources into my project. But I am wondering if this is the right

I'm a newb iPhone developer writing an app that has several large JPGs and sound files. Everything works ok if I drag these non-code resources into my project. But I am wondering if this is the right way to pac开发者_运维百科kage my app.

In Windows development, I would create a "resource DLL" that keeps the .exe size small. What is the equivalent for iPhone? I think I should be creating a "bundle" - can someone please give me some pointers to using these and how to link them into my main project?

Thanks!


JPEG images, audio files (if they're in MP3, AAC or similar compressed format) and video files (MPEG-4) are already highly compressed.

Packing them in an archive using a compression archive format like zip will not reduce the size of the files any further, plus it's more difficult to work with the files in your app. In fact, an iPhone app is already a zipped bundle so any compression you implemented would be redundant.

You should just continue to do what you're doing, it's standard procedure.


In iPhone development everything is already bundled together. Your executable, resources, config files are all packaged up into your .app. So just keep doing what you're doing, XCode automatically separates your resources and your executable (A few times I've noticed that a .app file in OSX actually shows up as a folder in Windows)

0

精彩评论

暂无评论...
验证码 换一张
取 消