Ionic Command Line
One of the coolest things about Ionic is how easy it is to preview your app. Running :
ionic serve -lc
This fires up the app in the browser, and will immediately allow you to preview any changes that you make with live reload.
Ionic labs http://lab.ionic.io/, is a cool app that also allows for quick and easy deployment and testing of an app.
On the other hand, it can be quite cumbersome at times to deal with testing the app on an emulator or device. One of the major issues that I’ve run into is that the app will not deploy to the device, or even worse it will not show updated changes on the simulator after deployment.
The stand deployment process for IOS is :
ionic platform add ios
ionic prepare ios
ionic build ios
ionic emulate ios
Often I’ve noticed that after running these commands, the app will not update with changes, so I have to go further and run:
ionic emulate ios -lc
Which emulates with live changes and usually seems to show the most updated app changes.
Another approach is to reset the app/plugins from scratch by running:
ionic state reset
The state reset command will remove all installed plugins and platforms and rebuild the app up from scratch, and usually seems to work out any kinks and get the updated emulated version running. One important thing to remember about state reset is that if you don’t have the plugins saved in your package.json / bower.json file they will not be reinstalled so you may have to manually reinstall them, or just make sure to install plugins with the — save flag in the future.
Another command that should be awesome and is supposed to allow live-reloading on your device, but doesn’t work is:
ionic run ios -lc
Basically what happens is it hangs on the device but I really wish it worked.