PhoneGap 7.0.1 now on Build, and it includes some important changes
Update: see the General Notes section below for features that have been fixed or added in this release.
PhoneGap Build has added a new version: cli-7.0.1. Aside from security updates and performance enhancements, this release includes some important changes behind the scenes in our build infrastructure. As such, we’re releasing it with a beta tag. Read up on the release details below, and be sure to carefully review and test your app after updating (as always).
As any issues or quirks with the new configuration are discovered, they’ll be added to the General Notes section below.
Here’s the version breakdown of cli-7.0.1 on PhoneGap Build (PGB):
- Cordova iOS 4.4.0 (release notes)
- Cordova Android 6.2.3 (release notes)
- Cordova Windows 5.0.0 (release notes)
This follows up our announcement that we’ll be retiring support for some older PhoneGap versions.
Update: Push plugin and cli-7.0.1 (iOS 4.4.0) were failing on PGB due to CB-13112. I reported a workaround here that in fact also didn’t work. However we’ve now patched PGB’s iOS 4.4.0 with the fix to CB-13112. Apologies for the confusion.
Changes to PhoneGap Build
With this new version PGB is handing over much of the heavy lifting to Cordova, and this might change how your app behaves. Here’s an overview of the big handoffs:
- icon and splash management is now handed off to Cordova. this should be seamless, but check that all your icons and splashes are working after upgrading (previously PGB would parse your config.xml, read icon and splash declarations, and stick those files into the correct place in your iOS/Android projects. now PGB simply hands your package to the Cordova CLI, and it does these steps for us. the CLI is better at it now)
- manifest templates now come from Cordova, rather than our own Confetti templating tool, which could cause significant changes in how your app behaves. A quick way to to check what changes have occurred is to unpack your app (iOS and Win: rename to .zip and unzip; Android: apktool) and compare the manifests from before and after your upgrade. Your manifests are Info.plist on iOS, AndroidManifest.xml on Android, and package.appmanifest on Windows.
- default config.xml preferences will now also come from the Cordova templates rather than PGB’s internal defaults. Similar to the changes to manifests, you can unpack your apps to see what preferences are being set for you and whether you need to change them from the default.
Why?
PhoneGap Build (PGB) was designed when PhoneGap and the Cordova project were very young, and as such PGB invented numerous features to add functionality, plug missing features and preferences, or patch PhoneGap/Cordova quirks. However, over the years as the project has grown, PhoneGap and Cordova have solved these problems, and honestly probably better than PGB has. We want to leverage all the hard work done by the Cordova team.
If you come across any issues with upgrading, please let us know in the PhoneGap Build Support Forum.
Opting out of the new builder
By default, if you use cli-7.0.1, you’ll be using the new builder and will be working with the changes above. Likewise with PhoneGap versions below 7.0.1 (i.e. cli-6.5.0), PGB will use the old builder. You can however manually opt-out of the new build server using the pgb-builder-version
preference.
To use cli-7.0.1 and the old builder:
<preference name='phonegap-version' value='cli-7.0.1' />
<preference name='pgb-builder-version' value='1' />
or to use the new builder with an older PhoneGap:
<preference name='phonegap-version' value='cli-6.5.0' />
<preference name='pgb-builder-version' value='2' />
Note on Phonegap Push Plugin 2.0.0 Support (Updated)
The (in)famous Simon MacDonald recently pushed out version 2.0.0 of the Phonegap Push plugin. This new version will only compile on PGB with Phonegap cli-7.0.1 and the new builder. You’ll also need to add a google-services.json
file (Android) and a GoogleService-Info.plist
file (iOS), amongst other possible changes. Read up.
Note: I’d previously reported that push 2.0.0 with cli-7.0.1 weren’t working, but that using cli-6.5.0 with the new builder would work. This was incorrect. However iOS 4.4.0 (cli-7.0.1) on PGB has now been patched for CB-13112, so push 2.0.0 with cli-7.0.1 should now be working. Apologies for the confusion.
Note on the Phonegap Windows platform
For previous versions, PhoneGap Build had a set of custom preferences for configuring certain Windows build settings. Now we support the full set of Cordova Windows Store settings (i.e. WindowsStoreDisplayName, WindowsStoreIdentityName, WindowsStorePublisherName). See the Cordova docs for more info.
General Notes
<preference name="android-versionCode" value="100" />
is not supported any longer, use the standard Cordova widget property:<widget id="..." android-versionCode="100"
- Launch Storyboards are inherently supported in this new builder and 7.0.1, check out Kerri’s blog post
- Use
density
instead ofqualifier
to declare your Android icons and splashes - Cordova’s
edit-config
is now supported on PGB. use that on cli-7+ in favour ofconfig-file
. See theedit-config
docs. resource-file
is now supported in PGB config.xml
Support
While we thoroughly test new features on PhoneGap Build, we can never cover all of your creative use cases and we look to our community to help us identify issues. If you come across any problems, please don’t hesitate to ping us on the PhoneGap Build support forum. 🍻