Mobile Support

So far, we've been building our app and testing only in a web browser,
but Meteor has been designed to work across different platforms - your socially website can become an iOS or Android app in just a few commands.

Angular 1 initialization

Before we set up PhoneGap (which is super simple with Meteor) we will need to make a small adjustment in our Angular 1 app initialization:

In main.js file, we will manually bootstrap our Angular 1 app according to the right platform:

PhoneGap

Meteor makes it easy to set up all of the tools required to build mobile apps, but downloading all of the programs can take a while - for Android the download is about 300MB and for iOS you need to install Xcode which is about 2GB.
If you don't want to wait to download these tools, feel free to skip to the next step.

Running on an Android emulator

Follow this instruction to install all of the necessary tools to build an Android app from your project.

When you are done installing everything, type:

meteor add-platform android

After you agree to the license terms, type:

meteor run android

After some initialization, you will see an Android emulator pop up, running your app inside a native Android wrapper.
The emulator can be somewhat slow, so if you want to see what it's really like using your app, you should run it on an actual device.

Running on an Android device

First, complete all of the steps above to set up the Android tools on your system.
Then, make sure you have USB Debugging enabled on your phone and the phone is plugged into your computer with a USB cable.
Also, you must quit the Android emulator before running on a device.

Then, run the following command:

meteor run android-device

The app will be built and installed on your device. If you want to point your app to the server you deployed in the previous step, run:

meteor run android-device --mobile-server my_app_name.meteor.com

Running on an iOS simulator (Mac Only)

If you have a Mac, you can run your app inside the iOS simulator.

Follow this instruction to run you through the setup necessary to build an iOS app from your project.

Submit your Android app to the Play Store:

Submit your iOS app to the App Store:

Summary

Now you can see how easy and amazing it is to work with Meteor and PhoneGap together.

But that's just the start - because of Meteor's hot code push, after you deploy your app to the stores, once you update your code, all your apps are
instantly updated, no need to go through the stores update process!