I'm currently building an app for iPhone, iPad, Android phones and Android tablets.
I'm working with a single code base like from this example.
But as my project is a little bit more complex due to support tablets too, I'm looking to exclude assets that are not used on the device that install the app.
To clarify, my project files/folders structure look like this:
Project root:
- html (html, JS, Css, images for android & ios project)
- css
- style.css
- style-android-phone.css
- style-android-tablet.css
- style-ios-phone.css
- style-ios-tablet.css
- images
- shared
- [...]
- phone
- [...]
- tablet -[...]
- shared
- js
- [...]
- templates (=html templates)
- phone
- [...]
- tablet
- [...]
- phone
- css
- android (eclipse project)
- assets
- www (symlink to ../../html)
- bin
- [...]
- gen
- [...]
- libs
- [...]
- res
- [...]
- src
- [...]
- [...]
- assets
- ios (xcode project)
- CordovaLib
- [...]
- My_project
- Classes
- [...]
- Plugins
- [...]
- Resources
- [...]
- [...]
- Classes
- My_project.xcodeproj
- www (symlink to ../../html)
- CordovaLib
For example, I don't want that the iphone app contains tablets assets like: html/css/style-android-tablet.css, html/css/style-ios-tablet.css, html/images/tablet/, html/templates/tablet/
currently, the app is kind heavy on iphone (for example) because of useless assets (mainly images).
I tried some ideas like: - using 2 tagets in the xcode project. One for iphone and one for ipad. But files and folders under www in xcode are unable to be set as target membership. Only www can be. - using 2 www directories and 2 targets, but iphone target still include the www that target ipad.
I think that this solution could help me but I don't really understand how to adapt it to my file structure.
So I request your help to find the best and simplier solution for the futur (next projects & releases of existing projects).
In advance, thanks for your help.
Cheers.