Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
174
rated 0 times [  175] [ 1]  / answers: 1 / hits: 17266  / 10 Years ago, thu, march 6, 2014, 12:00:00

I am using XCode 5.0.2 and Cordova 3.4.0-0.1.3 - What I find is after creating the project using the Cordova CLI and opening in XCode, no changes to the index.html file and index.js file are ever carried over to the simulator when I click run.
I have to open terminal and issues a Cordova Build command and then run the simulator and it works



I followed all the instructions here:



Phonegap - developing and launching app on simulator



xcode 4 + phonegap ... not update JS upon build?



And none of it works! any one a have a solution to this, because having to switch back and forth is becoming a pain.


More From » ios

 Answers
9

So after much searching I seem to have found a solution that works, here is what I did. After looking at other Stackoverflow questions I found someone that said this worked for them.




Find the file called copy-www-build-step.sh.



Mine was in
[project_folder]/platforms/ios/cordova/lib/copy-www-build-step.sh



In that file, find the lines beginning rsync -a ...



Add -c to the rsync lines, so they ready rsync -a -c ...




Well I tried that and it did not work on its own. I also tried the answer from Ville and that pulled closer but no cigar. Finally I took what the command from Ville and put it in the copy-www-build-step.sh file



so my top line is now



cd /path/to/your/cordova/project/
cordova prepare

SRC_DIR=www/
DST_DIR=$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/www
COPY_HIDDEN=
ORIG_IFS=$IFS
IFS=$(echo -en nb)
.....
.....
.....etc etc


And now I make change , and click run , bam all is updated. I hope this helps someone else.


[#72115] Wednesday, March 5, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jazminkyrap

Total Points: 631
Total Questions: 89
Total Answers: 109

Location: Finland
Member since Fri, Oct 21, 2022
2 Years ago
;