Friday, February 26, 2016

How to run ionic on real device.

Are you developing an apps with ionic and planning to deploy it on a real device ?  Cool !
Here are some  steps that you may follow to get it running on your device out of the box.
  1. Make sure that the Developer Option of your Phone is activated, if not here is a tutorial to help you out.     http://www.greenbot.com/article/2457986/how-to-enable-developer-options-on-your-android-phone-or-tablet.html
  2. Connect your phone to the computer with a USB cable.
  3. Make sure your phone is open and not locked.
  4. Open the terminal and navigation to your main project directory. You should now see sometime like the below content. > cd  HelloIonicProject 
  5. Adding your current platform - if Android :  > ionic platform add android
  6.  Adding your current platform - if ios :  > ionic platform add ios
  7.  Now it is time to build our project on it. if android : > ionic build android
  8. Now it is time to build our project on it. if ios :  > ionic build ios
  9. Your may do this, to copy all the files into the specified platform : > cordova prepare
  10. Finally run it for android : > ionic run android
  11. Finally run it for ios : > ionic run ios
Hope you make it !

No comments:

Post a Comment