Aren't universal binaries a huge waste of memory on the device?
While working on an universal binary for iPhone / iPad, I've been asking my self often: Is this really开发者_运维百科 so good? I believe the iPhone and iPod touch devices will simply download the whole package, including all the irrelevant iPad content. Since my app is graphics-heavy, the iPhone and iPod touch users would suffer from about 10 MB of irrelevant graphics. They're just trash and not used on their device. Same for iPad users, who will see something like 6 MB of garbage image data which is never used. Of course, along with all the non-used code for the device.
I wonder if this is really intelligent. If this is really the future: Downloading and installing a lot of trash and then worrying about buying an 8 GB, 16 GB, 32 GB or even 64 GB device just to be able to install more stuff. I already fear lots of the universal apps I have are just trashing my device full with unused files. It makes me feel stupid.
Any apps that aren't graphic heavy are worth making a universal binary for. eg: if you just have the standard cocoa UI elements and some data. Then all you do is set all the frames relative to the size of the frame.
If its effectively a seperate app (ie: you've got a ton of DIFFERENT picture files for the iPad version, then release it as such. Even if they are just higher-res pictures and such, it doesn't matter.)
You think that's silly? Try re-downloading an entire 80MB app (resources and all!) every time a small code change is made. :)
Given your figures of 8, 16, 32, 64 GB; I assume you're talking about storage capacity, rather than "memory" in the sense of RAM. If this is the case, you may consider compressing your resources and unzipping them to the app's sandbox for easy access on future boot-ups.
Alternatively, you could bundle only the iPhone / iPod resources with the app and download the iPad-specific resources separately. Users might not like the surprise bandwidth usage and it might not even get past Apple.
Finally, you could procedurally generate your resources and your users will love you for the saved space, if not battery life. Perhaps combine the best of both worlds and only generate the resources once?
精彩评论