cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Braden Shepherdson (JIRA)" <>
Subject [jira] [Commented] (CB-5397) "cordova prepare ios" overwrites existing source code files/directories
Date Tue, 19 Nov 2013 15:23:22 GMT


Braden Shepherdson commented on CB-5397:

The intended use of Xcode is as a build system and launcher for the emulator. The native code
files are not overwritten on prepare, only the www files. The correct place to edit the www
files is in $PROJECT/www, not $PROJECT/platforms/ios/www. The documentation should be loud
about this, rather than nearly silent.

You can use Xcode for editing the www files, but you need to explicitly point it at the $PROJECT/www
files, not the www directly it has indexed. We recognize that this is confusing and lame,
but it's out of our hands. Xcode doesn't handle symlinks nicely, or we would symlink the files
instead of copying them. (It will load the file correctly from the symlink, but when you save
it'll overwrite the link with a copy, if I remember correctly.) We are trying to avoid mixing
your app with plugin assets, to avoid collisions and so on.

> "cordova prepare ios" overwrites existing source code files/directories
> -----------------------------------------------------------------------
>                 Key: CB-5397
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.1.0
>         Environment: MacOS 10.8.5
> XCode 5.01
>            Reporter: Tom Ernhardt
> The cordova command line "cordova prepare ios" clobbers user-created source code files/directories
without warning
> Steps to reproduce:
> # create a test app
> cordova create test com.test test
> cd test
> cordova platform add ios
> # add a plugin
> cordova plugin add
> cordova prepare ios
> Then open the generated Xcode project in Xcode
> Add some source code files
> # Now add a different plugin
> cordova plugin add
> cordova prepare ios
> All the source code files and directories that you created in 
>   /platforms/ios/www/
> have just been deleted by the cordova CLI without any warning!

This message was sent by Atlassian JIRA

View raw message