Thinking some more about the problem I concluded that I don't personally have a problem with the creation of multiple versions of the artwork. Most of it can be done through batch processing and some hand tweaking. No big deal. The issue is with app bundle bloat and the download of a huge number of files into a device that will not use them.<p>Here's an off-the-top-of-my-head potential solution:<p>Update Xcode to sensibly handle file structures within a project. You know, the blue folders. We currently use blue folders for all app assets because, well, can you imagine maintaining 1600 files all in on directory?<p>The problem with blue folders today is that they needle you with pain. You have to remember to do clean builds (scripts during the build don't seem to work reliably) and, in general, be very aware of them. Once they are part of your process its not a big deal, but I think it's high time that Xcode come to this century and do something that most other development systems have been doing for, I don't know, decades?<p>Anyhow, once that is in place, you could have a directory structure such as this one at the app root:<p><pre><code> App Resources
App Resources @2X
App Resources ~ipad
App Resources ~ipad @2X
</code></pre>
I then want to include a JSON file at the app root level that points out the root directories for each device category. Maybe something like this:<p><pre><code> {
"ipod 1": "App Resources",
"ipod 2": "App Resources",
"ipod 3": "App Resources",
"ipod 4": "App Resources @2X",
"iphone 1": "App Resources",
"iphone 2": "App Resources",
"iphone 3": "App Resources",
"iphone 4": "App Resources @2X",
"iphone 4S": "App Resources @2X",
"ipad 1": "App Resources ~ipad",
"ipad 2": "App Resources ~ipad",
"ipad 3": "App Resources ~ipad @2X"
}
</code></pre>
Now provide for a way to load this JSON data into the app and have relevant methods, such as "imageNamed" use a device specific path. My guess is that you'd want this to be by extension rather than modification so:<p><pre><code> + (UIImage *) imageNamedAndKeyForPath:(NSString *)name key_for_path:(NSString *)key
</code></pre>
Obviously the key would be used to retrieve the value from the JSON file or, preferably, a value already stored in memory when the JSON file was parsed at app start time.<p>Apple then, would have a mechanism to only deliver the appropriate resource files during an in-device installation. iTunes could download the whole set and also be intelligent during to-device installation. They'd use the JSON file to have the developer tell them which files to deliver.<p>Any files left outside the designated directories would be treated as they are today: Everything goes to every device.<p>Also, other methods that take a path, such as "imageWithContentsOfFile" ought to have a version that uses the aforementioned mechanism while --and this is important-- letting me specify relative paths from the device-specific folder. If I have something like this:<p><pre><code> <device specific folder>
+ character
+ arms
+ legs
+ head
+ background
+ trees
+ rocks
+ clouds
</code></pre>
I ought to be able to access the path structure relative to the chosen device-specific directory of assets.<p>On first inspection this sounds like a good solution. I haven't thought it through entirely. I'd be interested to hear of what holes the idea might have.<p>Something like this could have a striking effect on app bundle size, particularly on older devices. I don't think that it places an undue burden on developers either, if anything it makes things easier. Heck I'm sure Apple could even find a way to make it a marketing point: "Four times as many apps in the same space".