title: Phonegap - assets and universal iOS apps
body: <p>I'm currently building an app for iPhone, iPad, Android phones and Android tablets.</p>
  
  <p>I'm working with a single code base like from <a href="http://devgirl.org/2012/07/16/phonegapcordova-templatetutorial-for-sharing-code-between-platforms/" rel="nofollow noreferrer">this example</a>.</p>
  
  <p>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.</p>
  
  <p>To clarify, my project files/folders structure look like this:</p>
  
  <p>Project root:</p>
  
  <ul>
  <li>html (html, JS, Css, images for android &amp; ios project)
  
  <ul>
  <li>css
  
  <ul>
  <li>style.css</li>
  <li>style-android-phone.css</li>
  <li>style-android-tablet.css</li>
  <li>style-ios-phone.css</li>
  <li>style-ios-tablet.css</li>
  </ul></li>
  <li>images
  
  <ul>
  <li>shared
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>phone
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>tablet
  -[...]</li>
  </ul></li>
  <li>js
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>templates (=html templates)
  
  <ul>
  <li>phone
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>tablet
  
  <ul>
  <li>[...]</li>
  </ul></li>
  </ul></li>
  </ul></li>
  <li>android (eclipse project)
  
  <ul>
  <li>assets
  
  <ul>
  <li>www (symlink to ../../html)</li>
  </ul></li>
  <li>bin
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>gen
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>libs
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>res
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>src
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>[...]</li>
  </ul></li>
  <li>ios (xcode project)
  
  <ul>
  <li>CordovaLib
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>My_project
  
  <ul>
  <li>Classes
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>Plugins
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>Resources
  
  <ul>
  <li>[...]</li>
  </ul></li>
  <li>[...]</li>
  </ul></li>
  <li>My_project.xcodeproj</li>
  <li>www (symlink to ../../html)</li>
  </ul></li>
  </ul>
  
  <p>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/<em>, html/templates/tablet/</em></p>
  
  <p>currently, the app is kind heavy on iphone (for example) because of useless assets (mainly images).</p>
  
  <p>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.</p>
  
  <p>I think that <a href="https://stackoverflow.com/questions/10836460/how-do-i-use-symbolic-links-with-xcode-4-and-cordova">this solution</a> could help me but I don't really understand how to adapt it to my file structure.</p>
  
  <p>So I request your help to find the best and simplier solution for the futur (next projects &amp; releases of existing projects).</p>
  
  <p>In advance, thanks for your help.</p>
  
  <p>Cheers.</p>