Reputation: 926
I am developing a mobile app using Apache Cordova
I have created a new project with cordova example com.domain.example ExampleApp
The CLI then creates the basic skeleton with the starter files
I then add platforms with cordova platform add ios
and so on
I notice that if I browse the platform directory, each added platform has a www
directory that contains a copy of the files in the project's main www
directory, as well as some settings from the main config.xml
file in a similar file in the platform directory.
I'm not anywhere near the stage of building yet, but am wondering, after editing the contents of the main www
directory and adding new settings to the main config.xml
file, will all of my changes get applied to the corresponding directory and file in the platform directories upon build?
So I'm asking, is it a) ok to add platforms to my project before I start developing in the www
directory and so on, and the other files will be updated when the app is built, or b) do I need to wait until I'm ready to build and add the platforms just before building so all the content in the www
directory is correctly copied to each platform?
Upvotes: 1
Views: 66
Reputation: 53301
If you run cordova prepare
it will copy the changes from www and config.xml to the platforms (you can also do it per platform with cordova prepare platformName
)
Other commands like cordova run
and cordova build
will also run prepare internally.
So, add the platforms whenever you want, but you should test the app on a real device sooner or later and you will have to add the platforms for that
Upvotes: 1