Preparing for the Mega App

In order to create our Mega App's initial files from the Cordova CLI, we run the cordova create command as follows:

> cordova create megaapp com.jsmobile.megaapp MegaApp

Then, we will add the following Cordova plugins to our project using the cordova plugin add command:

  • Camera plugin:
    > cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
    
  • Media plugin:
    > cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-media.git
    
  • File plugin:
    > cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file.git
    
  • Device plugin:
    > cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
    
  • Dialogs plugin:
    > cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git
    

As we support three platforms (iOS, Android, and Windows Phone 8), we run the following cordova platform add command from the app directory to add the platforms that we want to support:

> cd megaapp
> cordova platform add ios
> cordova platform add android
> cordova platform add wp8

Finally, we can build our app on all the platforms using the following cordova build command:

> cordova build

Note

Do not forget to apply the general Cordova 3.4 app fixes for iOS 7 and Windows Phone 8, which were illustrated in detail in Chapter 3, Apache Cordova Development Tools.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.186.46