How to organize an apache cordova project ?

17 views
Skip to first unread message

Laurent

unread,
Sep 7, 2015, 3:21:56 PM9/7/15
to phonegap
Hi,

Probably it's a trivial subject but I don't really find the best way to generate an IOS application.
I have developped my application on windows and I can easily generate the application for Android but for IOS , I need to compile the application on a Mac with Xcode.
My trouble is what do I really need to do on Mac.
Just create the project and checkout the project from my git repository ?
In that case I need to put all the libraries in my git reposito
I think that probably there is a better thing to do.

Thanks for your help.




Kerri Shotts

unread,
Sep 7, 2015, 3:51:31 PM9/7/15
to phonegap
There's no single way to do this, and as of late, my project structure has treated the Cordova project as build output, and not the actual project. (That is, the /project/ is one level above the Cordova project -- since I might want other outputs, like Electron, Web, etc.)

You will want to commit your project to your git repo, yes -- but you'll want to ignore certain files in your .gitignore:

*.swp             # if using VI(M)
/node_modules     # if using Node for any development purposes
/platforms        # Cordova generated: unless you've made customizations here, these can be considered build artifacts
/plugins          # Cordova generated: these can be considered build artifacts



If you're using the --save functionality when adding plugins and platforms, you should just be able to checkout your code and build your app as normal (assuming Cordova is installed). The missing platforms and plugins will automatically be fetched for you. If you haven't been using --save, you'll want to start. :-)

Note: If you're using a custom plugin, my suggestion is to put that in a Git Repo separate from your app, make it work with plugman, and then it's as easy to install as any other Cordova plugin.

Essentially, the only things that should make it to your repo is the config.xml file, your www directory, any icons/splashes (typically in res/), and any documentation.

Note: If you make changes in /platforms, this becomes a little more difficult. I don't do it, so I can ignore the entire directory.

Jesse Monroy

unread,
Sep 7, 2015, 7:14:02 PM9/7/15
to phonegap
@Laurent,

This may be of interest

Using Cordova CLI on Mac OS X Mavericks to build iOS apps (8/2015)
https://iphonedevlog.wordpress.com/2014/06/24/using-cordova-3-5-cli-on-mac-os-x-mavericks-to-build-ios-apps/

Jesse
Reply all
Reply to author
Forward
0 new messages