The PhoneGap Build Tile on the command center provides the ability build and distribute your PhoneGap mobile application through the Adobe PhoneGap Build Service.
All supported platforms defined within the Application Details tile will be built with PhoneGap Build when pushing a remote build with the PhoneGap Build Tile.
In order to take advantage of PhoneGap Build you need to configure the AEM PhoneGap Build Cloud Service with your PhoneGap Build account information.
If you don't currently have an account, navigate to https://build.phonegap.com and sign up! If you have an Adobe Creative Cloud membership, you may have support for up to 25 private apps (non-open source apps).
Once you've verified your PhoneGap Build account is active, nativigate to your AEM Cloud Management Console, specifically the PhoneGap Build Cloud Service (http://localhost:4502/etc/cloudservices/phonegap-build.html). You can quickly navigate directly to this URL through the PhoneGap Build tile by clicking the chevron and selecting, 'configure'. From here click the wrench button (see images below).
From the PhoneGap Build Tile, select the 'Configure' option.
In the Configure PhoneGap Build Modal Window (screenshot below), click on the 'Select a PhoneGap Build Configuration' drop-down list. If the configuration you would like to use is not available, click the 'Manage the PhoneGap Build Configurations' button to navigate to the PhoneGap Build Cloud Service Configuration and create a new service.
From within the PhoneGap Build Cloud Service (screenshot below), hit the '+' icon to configure a new cloud service configuration for your PhoneGap Build service.
From within the create configuration dialog, give the configuration a title (e.g. Geometrixx Corporation as seen below) and hit the 'create' button.
When prompted, enter your build.phonegap.com account information.
Finally, navigate back to the AEM Command Center and select the PhoneGap build configuration you just created and will now be displayed within the 'Select a PhoneGap Build Configuration' drop-down list (screenshot above). Click 'Update' button and you've completed the configuration of your build tile cloud service.
Once you've configured your PhoneGap build tile and service, you can now invoke a remote build with Adobe PhoneGap Build.
From the PhoneGap build tile, click 'Build Remote' (see image below).
If the build fails for any reason (red iOS icon below indicates that platform failed), you can hover over the icon to get the error message. Alternatively, you can click the triple dot, '...' at the bottom of the tile to navigate directly to https://build.phonegap.com (you must authenticate) and watch and manage your build directly.
PhoneGap provides a command-line-interface to build your application locally.
Compile the PhoneGap application on your computer using the PhoneGap Command-line Interface (CLI). To include the AEM content into your application, AEM creates a ZIP file that contains the content of your mobile application, Content Sync configurations, and other required assets. Download the ZIP file and include it in your build.
In order to take advantage of PhoneGap's command-line-interface, you'll need to set-up your local environment to include:
- Platform SDK (iOS, Android, WindowsPhone, ...) and,
- PhoneGap CLI
- phonegap create myApp
- cd myApp
- phonegap run ios (or android, ...)