Is the Phone Gap closed in 2020?
The PWA platform pushed the end of PhoneGap and Adobe's investment in Apache Cordova
About 5 min reading time
PhoneGap started as a project to fill the gap between the native and the Web world in 2008. Adobe announced the end of the PhoneGap product line and the end of the investment into Apache Cordova because "PWAs are increasingly bridging the gap between web and native mobile apps (...) without the need for containers."
Is the native-web gap closed in 2020 thanks to PWAs?
Hybrid web app development started #
iPhoneOS included UIWebView, a native control to render web content but without access to a lot of JavaScript APIs or a bridge to native code.
Twelve years ago (August 2008), a Canadian company -Nitobi- released to the open-source community a new project: PhoneGap, a framework to develop native apps with HTML5, CSS, and JavaScript for iPhoneOS -the name of iOS at that time. PhoneGap added that missing bridge and started to support a list of APIs to access many features.
I wrote in 2009 in my book Programming the Mobile Web: "PhoneGap is an open-source framework for creating mobile web applications in HTML and JavaScript while still taking advantage of the core features of native applications in some platforms."
"We didn't want to get locked into a particular vendor-proprietary platform," said Brian Leroux, Senior Architect of PhoneGap at the time in the previous presentation video.
The first stable release was PhoneGap 0.6 released in February 2011, and 1.0 in July 2011 a few months before Adobe acquired it. Adobe rebranded the project as Adobe PhoneGap while sending it to the Apache Foundation as Apache Cordova.
Many PhoneGap developers panicked when the AppStore changed rules and approval of apps not using the Apple SDKs were not clear. Pressure over Apple led to a confirmation that these apps were ok if they were not "just websites wrapped in a web view." The fight was not with PhoneGap but with Adobe with their Flash runtime for iOS.
That was the beginning of the hybrid app multiplatform development approach on mobile devices; all the previous attempts were platform-specific (such as Symbian WRT) or a failure in the market (such as BONDI widgets).
Adobe is out of the web app business #
While this is the official end of the PhoneGap era, it's true that Adobe hasn't been actively evolving it in the past few years. PhoneGap Build -the cloud-based building service- was quite old, and investment in Apache Cordova from Adobe was not happening. Adobe PhoneGap never stood up as an aggregated service on top of Apache Cordova.
I've felt a similar moment when Adobe retired Flex and its investment in the Apache version. The reality is that Flex is dead today. Will that happen to Apache Cordova also? The community seems more significant than the Flex one, so we'll see.
Platforms now and then #
PhoneGap 1.0 plan was to support:
- iPhone and iPad
- Android
- BlackBerry
- Symbian
- webOS
- Windows Phone 7
- Bada
During these twelve years, other platforms were supported, such as:
- Windows 8.1
- Windows Phone 8.x
- Windows 10 for Phones
- macOS
- Firefox OS
- Electron (for multiplatform desktop)
- Ubuntu Touch
While iOS, iPadOS, and Android are still here with us, the rest of the original platforms are gone. I'm sure that even saying Bada will make some readers think twice about what that was.
Today, probably iOS (including iPadOS), Android, and Electron are still important, so from a platforms' point of view, the gap is not closed but narrower compared with a decade ago.
Original abilities comparison #
One of the significant advantages of PhoneGap at the time was to access native features using JavaScript APIs.
Let's review the core APIs from the initial PhoneGap version to see where we are in 2020:
- on Android with PWAs. both from the browser and using TWA for Google Play Store
- on iOS or iPadOS installing PWAs from the browser
- on iOS or iPadOS using WKWebView for the AppStore without Apache Cordova
PhoneGap 2009 | Android 2020 | iOS 2020 | iOS WebView 2020 |
---|---|---|---|
Offline support | ✅ | ✅1 | ✅ |
Installed Icon | ✅ | ✅ | ✅ |
Accelerometer | ✅ | ✅2 | ✅ |
Camera | ✅ | ✅ 🆕 | ✅3 |
Connection | ✅ | ❌ | ❌ |
Contacts | ✅ 🆕 | ❌ | ❌ |
App Events | ✅ | ❌ | ❌ |
Compass | ✅ | ✅ | ✅ |
Geolocation | ✅ | ✅ | ✅ |
Device Info | ❌ | ❌ | ❌ |
File | ✅ 🆕 | ❌ | ❌ |
Media | ✅ | ✅ 🆕 | ❌ |
Capture | ✅ | ✅ | ✅ |
Notification4-Alert | ✅ | ✅ | ✅ |
Notification4:1-Sound | ✅ | ✅ | ✅ |
Notification4:2-Vibration | ✅ | ❌ | ❌ |
Storage-Web Storage | ✅ | ✅ | ✅ |
Storage-WebSQL | ✅ | ✅5 | ✅5:1 |
Network | ✅ | ❌ | ❌ |
Native Plugins | ❌6 | ❌ | ✅ |
Apache Cordova Plugins and PWAs #
Now let's make the same analysis but with current Apache Cordova built-in plugin list not available in 2009.
Cordova 2020 | Android 2020 | iOS 2020 | iOS WebView 2020 |
---|---|---|---|
Battery Status | ✅ | ❌ | ❌ |
Camera | ✅ | ✅ 🆕 | ✅3:1 |
Device Info | ❌ | ❌ | ❌ |
Dialogs | ✅ | ✅ | ✅ |
File | ✅ 🆕 | ❌ | ❌ |
Geolocation | ✅ | ✅ | ✅ |
InApp Browser | ✅ | ✅ | ❌ |
Media | ✅ | ✅ | ✅ |
Media Capture | ✅ | ✅ 🆕 | ❌ |
Network Information | ✅ | ❌ | ❌ |
Screen Orientation | ✅ | ❌ | ❌ |
Splash Screen | ✅7 | ✅ | ✅ |
Status Bar | ✅ | ❌ | ✅ |
Vibration | ✅ | ❌ | ❌ |
White List | ❌ | ❌ | ❌ |
Is the native-web phone gap closed then? #
Adobe said: "PWAs are increasingly bridging the gap between web and native mobile apps through capabilities such as offline support, push notifications, home-screen icons, and full-screen view control without the need for containers."
Is it true? Is the gap closed with PWAs?
The answer is not straightforward: there are fewer platforms today; instead of eight, we probably have three. For some apps, the PWA platform is good enough today, and it makes sense to say that we don't need PhoneGap anymore.
However, for many apps, the statement might be valid only for Android from this year, thanks to recent API additions from Project Fugu. You can see how many ❌ are actually on iOS-both from a browser point of view and a WebKit point of view. For many apps, then, publishing a web app for iOS users will still need a framework like PhoneGap.
There are also some apps that, even for Android, will need some web view helper because the Trusted Web Activity API today is far behind what you can do on a WebView in terms of bridging native and web.
So I think Adobe's statement is not entirely true; we are not 100% ready to remove app containers for all the web apps. We are closer today than 12 years ago, for sure. We are closer than 2 years ago. But Apache Cordova will still be there as well as Capacitor if your web app can't use just the PWA technologies.
If you'd like to continue building in the cloud, you can migrate to Ionic AppFlow.
It's the end of an era. We thank PhoneGap and the team for all they've done for the web and mobile space.
In 2012, Brian Lerioux wrote in a blog post in 2012: The ultimate purpose of PhoneGap is to cease to exist.
Live long and prosper 🖖🏽
Size and lifetime of the storage is restricted ↩︎
Accelerometer and Gyroscope support was disabled by default during 2019; now it's possible to use it again with a permission API ↩︎
No getUserMedia or WebRTC is available in WKWebView; only can be used through input capture. ↩︎ ↩︎
Notification in PhoneGap was not about Web Notifications or Web Push. This is just the ability to render a native alert dialog, a beep sound or vibrate the device while the app is running ↩︎ ↩︎ ↩︎
WebSQL is disabled on iOS in 2020, but IndexedDB is available ↩︎ ↩︎
With TWAs, there is no API to execute custom JavaScript code; you can do that using the WebView that is not the recommended way to distribute a PWA in the PlayStore today. ↩︎
Limited support ↩︎