Cordova Run Config

If you want to use make web app can run in many platforms like ios, andorid and so on, you can learn cordova.
Write one time use html, css, javascript, run everywhere.
React.js is very popular recently, you can use js framework to make your web app better and better.
cordova cordova homePage

cordova

Apache Cordova is an open-source mobile development framework.
It allows you to use standard web technologies - HTML5, CSS3, and JavaScript for cross-platform development
Apache Cordova enables software programmers to build applications for mobile devices using CSS3, HTML5,
and JavaScript instead of relying on platform-specific APIs like those in Android, iOS, or Windows Phone.
cordova

cordova need node.js and npm development enviroment.

start

Installing Cordova

1
$ npm install -g cordova.

Create a project

1
$ cordova create MyApp cordova create MyApp

Add a platform

  • You can add ios, android, browser and so on.
    1
    2
    3
    $ cd MyApp

    $ cordova platform add browser

    Run your app

  • From the command line, run cordova run .
    1
    $ cordova run browser

Deploy the app

If you use mac, you can develop andorio and ios, But if you use other system, you can’t develop ios.

  • To deploy the app on a connected iOS device:
    1
    $ cordova run ios --device
  • To deploy the app on a default iOS emulator:
    1
    $ cordova emulate ios
  • You can use cordova run ios –list to see all available targets and cordova run ios –target=target_name to run application on a specific device or emulator (for example, cordova run ios –target=”iPhone-6”).
    1
    2
    $ cordova run ios --list
    $ cordova run ios --targets="iPad_Air"
    You can also use cordova run –help to see additional build and run options.