Categories
Cordova (Phonegap) Hybrid Apps iOS Development Libraries Open Source PWA

Capacitor – Native Functionality In PWA’s, iOS And Android With The Same Code

Developing native apps that work across the iOS and Android platforms is difficult enough by itself, and with PWA’s it can be even more challenging to account for the differences between each browser and platform.

Capacitor is an open source library from the folks behind the Ionic framework that changes that providing a javascript framework that allows you to access many native features within PWA apps, and also within hybrid iOS and Android apps. There is also support for creating Electron apps (although a WIP).

For those familiar with Phonegap/Cordova, you can think of Capacitor as being similar, but with support for PWA’s and Electron.

This image shows the camera component running in a web app on Android:

You can try out the web app created with the ionic demo that utilizes the Capacitor camera on Firebase here.

The features you can access with Capacitor include:

  • Camera Support
  • Geolocation
  • Motion (Accelerometer and Orientation)
  • File system features
  • Local Notifications
  • Clipboard
  • The share dialog

And many more features.

You can find Capacitor on the website here.

A must-know library for anyone developing hybrid apps and PWA’s and needs to make sure everything works across the different platforms.