Reputation: 715
I started to develop ionic 2 cordova app on mac and doesn't update ios Application.
My pc specs are,
node v8.9.1
npm v5.5.1
cordova v7.1.0
ionic v3.17.0
editor VSCode
if I want some code change in ionic-v1 then I can edit platform -> ios -> www ->.js
files or platform -> ios -> www ->.html
files and reload xcode then changes appear on real device.
But in ionic 2 app platform -> ios -> www
folder contain minified files and cannot edit these files. so I follow this process but code doesn't change.
cordova platform add ios
and run ios app on xcode. initial app runs fineproject -> src -> pages ->home ->home.component.ts
edit home.component.ts and home.component.html cordova prepare
to add changes to ios platformclean->build->run
project again.. changes doesn't appear. cordova platform remove ios
and readd it using cordova platform add ios
then new changes are appear.I develop ionic-v1 and ionic 2 apps on windows and those are working perfectly on device. what is the correct procedure to develop ionic 2 app on mac and dedug it correctly. any help could be appreciated. Thank you.
Edit Please note that I’m facing this issue in ionic 2 app run on my physical iPhone
Upvotes: 0
Views: 1249
Reputation: 29614
Step 3. is the problem. You are directly running cordova prepare
command.
Use the ionic cli.
ionic cordova prepare ios
Copies assets to Cordova platforms, preparing them for native builds
which means it copies resources from your assets folder to your platforms. This doesnt update your build with the code changes.
You should be using,
ionic cordova build ios
For running you can do ionic cordova run ios
or ionic cordova emulate ios
.
Upvotes: 1