On Fri, Sep 27, 2013 at 12:11 AM, Anis KADRI <anis.ka...@gmail.com> wrote:
> As far as IDEs, the answer is simple. You should not use IDEs and > cordova-cli at the same time. Until IDEs are aware of cordova-cli > there is no point in creating projects with cordova-cli because > everything gets blown on every build. I am not even sure we can make > Xcode aware of cordova-cli. We've already talked about this prior to > the 3.0 release and that is why we have the create scripts and plugman > approach. You should not be using cordova-cli either if you're doing > some custom native dev that can't be pluginized (changing the main > Activity.java or AppDelegate.m or whatever). If you're using > cordova-cli just to create a project and then open an IDE to develop, > you're probably doing it wrong. You should be creating a native > project and using plugman instead. > > Oh, man, I'm definitely doing it wrong :) I'm almost always using the CLI to create projects, and then opening the platform projects in Eclipse or XCode to run them. When I update code, I run prepare, and refresh in the IDE before running again. (In XCode, I generally don't even need to refresh; it just knows when the files have changed.) I don't mind using the IDE for debugging if (when) things don't work -- but I know that all of the assets are ephemeral, and that I need to make the *real* fixes outside of the platforms directory. I hope that eventually we can have 'cordova prepare' just be part of the build step in the IDEs, and let people just edit the master files in www/ and build from there with the IDE, but I think we're a long way from there. Until then, the IDE is occasionally critical for debugging, even on a CLI project (wrong as it is ;) ) Ian