Question

I have a structure like: root | www | platforms | plugins (a typical cordova project structure)

Now I run cordova platform add ios which generate my ios project in platforms/ios/

Open the ios project in XCode, I cannot see cordova.js in side my project tree. Use the "Show in finder" to reveal where www is, shockingly it's the root/www, not the platforms/ios/www.

Is that a problem or an enhancement of cordova? It breaks my project now.

Was it helpful?

Solution

mine is ok. open your staging folder. You cordova.js located in www folder.

enter image description here

OTHER TIPS

Found this question when I have the same question, but found the official explanation here: http://cordova.apache.org/docs/en/4.0.0/guide_cli_index.md.html (In the buttom of section "Add Platforms")

Hope it help saving some time for others have same question.

When using the CLI to build your application, you should not edit any files in the /platforms/ directory unless you know what you are doing, or if documentation specifies otherwise. The files in this directory are routinely overwritten when preparing applications for building, or when plugins are reinstalled.

If you wish at this point, you can use an SDK such as Eclipse or Xcode to open the project you created. You will need to open the derivative set of assets from the /platforms/ directory to develop with an SDK. This is because the SDK specific metadata files are stored within the appropriate /platform/ subdirectory. (See the Platform Guides for information on how to develop applications within each IDE.) Use this approach if you simply want to initialize a project using the CLI and then switch to an SDK for native work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top