Xcode ignoring changes to project

23 views
Skip to first unread message

Jette Derriche

unread,
Mar 6, 2015, 6:16:16 AM3/6/15
to phon...@googlegroups.com
I am using cordova 4.2 and Xcode 6.1 ... i am new to Xcode so maybe i am missing something

Trouble is that changes to javascript files does not take effect, when running the project on my iPod. 

Before running the project in Xcode, I do a 'cordova run ios'. 

Could it be that Xcode is caching files? If so, is there a way to clean out that cache?


/Jette

Jette Derriche

unread,
Mar 6, 2015, 7:20:57 AM3/6/15
to phon...@googlegroups.com
Could it be that files should be edited within Xcode? I usually use Vim in a terminal. But changes seem to take effekt if I use the Xcode editor.

/Jette

Kevin Grabher

unread,
Mar 6, 2015, 10:16:33 AM3/6/15
to phon...@googlegroups.com
You should make your changes in Project/www/
than use either cordova build ios and hit run in xcode or use cordova run ios 
The project you should open in xcode is in Project/platforms/ios/ -> project.xcodeproj

You shouldn't edit stuff in xcode (in the platform/ios/ directory) because next time you build the changes will be gone, since the build is done from the www directory in the project folder.

Kerri Shotts

unread,
Mar 6, 2015, 3:38:34 PM3/6/15
to phon...@googlegroups.com
1) Make sure you always "cordova prepare..." to ensure your project's files are copied to the platform. ("cordova run" also does this, which you indicate you are doing.)
2) If you do a run/build step, don't have the project open in Xcode at the same time. This may simply be my paranoia, but beyond a simple "cordova prepare", I close the project in Xcode, execute the command, and reopen the project (this is typical if I'm adding a plugin, say). 
3) Clean the project from Xcode. I've not had to do this in a very long time, but it may help in your situation.
4) Worst case: delete the app from the device and rerun. You shouldn't have to do this, but when all else fails...!

Kerri Shotts

unread,
Mar 6, 2015, 3:40:55 PM3/6/15
to phon...@googlegroups.com
Yeah, no. Don't do that unless you are fine with the changes being overwritten later. It sounds like to me like "cordova prepare" isn't being executed (though it should be on "cordova run"). See my other response. 

I do occasionally edit within Xcode, but only when debugging and trying out various things. I have no expectation of permanence when I do so, and if I need to ensure something is persistent, I copy it out to the project root www folder.

Jette Derriche

unread,
Mar 10, 2015, 7:25:21 PM3/10/15
to phon...@googlegroups.com
Thanks a lot for the info Kerri ... seems to be working now :-)

/Jette
Reply all
Reply to author
Forward
0 new messages