[TIMOB-4483] Add iPad specific resource folder for universal binary support
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-06-30T14:16:51.000+0000 |
Affected Version/s | Release 1.7.1 |
Fix Version/s | Sprint 2011-26 |
Components | iOS |
Labels | n/a |
Reporter | Alan Leard |
Assignee | Blain Hamon |
Created | 2011-06-22T13:42:21.000+0000 |
Updated | 2017-03-21T21:04:16.000+0000 |
Description
Users would like to have an iPad specific resource folder just like the android and iphone folders to store iPad specific resources when creating a universal binary project.
OK'd by Android team. They support android/X subdirectories, where X is a device resolution (and is pre-determined by Google). However, after a discussion with Don, we should force a new directory structure for platform-specific resources. We cannot have a strictly Resources/ipad directory - then common data between iphone and ipad could not be combined (no clue which from what directory is appropriate) without duplication. Therefore, we should have: Resources/platform/ios - Common resources for iOS devices Resources/platform/ios/iphone - iPhone/iPod-specific resources Resources/platform/ios/ipad - iPad-specific resources
After working on this for a while and trying to interpret this, came up with at least four mutually exclusive interpretations of what needs to be implemented. Need a test case of the file structure expected from the project, and the file structure expected in the built app, AND what js should call to access the various files.
In talking with Don, it turns out that, beyond the 'android' folder, the naming/folder conventions are done by the OS. However, on iOS, folders are not used to fix namespace conflicts. Instead, the file has a specific naming convention. See http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/LoadingResources/Introduction/Introduction.html#//apple_ref/doc/uid/10000051i-CH1-SW1 and http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/LoadingResources/ImageSoundResources/ImageSoundResources.html#//apple_ref/doc/uid/10000051i-CH7-SW17 We honor this for images. That is, in the iPhone folder, you can specify: * foo.gif will work in all cases, but can be overridden * foo@2x~iphone.gif will override on retina display ipods and iphones * foo@2x.gif will also override on retina display ipods and iphones * foo~iphone.gif will override on any display ipods and iphones * foo~ipad.gif will override on ipads This is only for graphics, but no folder is necessary for this.
See comments: In short, there already exists an Apple-provided naming convention to keep images iPad-only or iPhone-only when fetching them at runtime.
Will the same convention work with js files?
Closing ticket as invalid.