Generate a Cordova application

Before moving forward, let's prepare a Cordova/PhoneGap application. We can implement the entire game in a web browser, and port it into Cordova in the end. However, I would like to finish this task earlier rather than later.

Let's remember what we did in Chapter 1, Installing and Configuring PhoneGap, and run the command to generate the Cordova application:

$ cordova create crazy-bubbles com.cybind.crazybubbles CrazyBubbles

This command will create a project for us. We now need to add two of our favorite platforms (iOS and Android):

$ cd crazy-bubbles
$ cordova platform add ios
$ cordova platform add android

To make out status bar look nice, let's just add a status bar plugin, as we did earlier:

$ cordova plugin add org.apache.cordova.statusbar

Now let's adjust style of the status bar by adding several preferences into config.xml in the root folder:

<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="StatusBarStyle" value="lightcontent" />

Now, we just need to emulate our newly created dummy application:

$ cordova emulate ios

Finally, we will see a standard UI that we will need to change. Now, we need to start using the Phaser framework.

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

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