Skip to content
Avi Haiat edited this page Jul 24, 2015 · 6 revisions

Warning:
You need to follow the Quick Start First application guide before this tutorial with one exception:

you need to call
$ yo mcfly myapp --mobile instead of
$ yo mcfly myapp

Change destination platform

By default cordova will run for ios. You can change it by modifying cordova->platform in gulp_tasks/common/constants.js

Settings

We will use prod (production) mode and android platform...

$ gulp dist --mode prod
$ cd dist/maypp/prod/
$ cordova platform add android

Run it

$ gulp cordova:run --mode prod

When you run gulp browsersync --t myapp the task will detect that myapp is a mobile app, and will automatically launch both a browser-sync browser window and a livereload emulator. You can pass an additional --platform option to tell which emulator you want (ios, android, etc...). If you don't pass --platform it will choose the value from constants.js (constants.cordova.platform).

When you are done with testing the app in the browser or the emulator, you can attach your phone device via an USB cable.

If you want to upload your app to testfairy, first make sure you fill in your api_key for testfairy in gulp_tasks/common/constants.js, and then simply run

$ gulp cordova:testfairy
Clone this wiki locally