Game Development Reference
In-Depth Information
The current application version can also be set in this main node. This can be useful, especially when
collaborating with other developers. This version number will be displayed within the application listing on the
PhoneGap Build web site (see Figure 13-5 ).
Figure 13-5. Application build properties, seen in the application page
The name of your application is also declared here in the configuration file within the element name . The
description and author elements specify metadata and contact information that may appear within app store
listings.
Next, the platforms that you want PhoneGap to build for are listed (see Listing 13-4).
Listing 13-4. config.xml - Specifying Target Platforms
<gap:platform name="ios"/>
<gap:platform name="android"/>
In recent past, PhoneGap Build would automatically begin a build for all available platforms when uploading
your content. This welcomed feature allows you to specify only the platforms you are currently developing for. Next is
a set of preference and access elements (see Listing 13-5).
Listing 13-5. config.xml - Preference and Access Elements
<preference name="orientation" value="portrait"/>
<preference name="fullscreen" value="true"/>
<access origin="*" />
Here you can specify the preferred orientation for your application. Unlike web apps, you can lock the orientation
here if you prefer to do so. In the Fakezee game, it will be locked in portrait orientation. It will also launch in full
screen, which is also listed here.
You can use access elements to create a whitelist of domains that your application is allowed to load data and
assets from. In this project, a wildcard is used to indicate that the application is fine to load from anywhere.
The icon and splash image elements, as prepared for iOS, are listed in Listing 13-6.
Listing 13-6. config.xml - Icon and Splash Screen Assets for iOS
<icon src="icons/apple-touch-icon-57x57.png" gap:platform="ios"
width="57" height="57" />
<icon src="icons/apple-touch-icon-72x72.png" gap:platform="ios"
width="72" height="72" />
 
Search WWH ::




Custom Search