Accessing Native Features
Native mobile APIs and device features are what make modern mobile apps so useful.
Fortunately, adding this functionality when building enterprise Web Native apps on the Ionic stack is easy. To do this, developers will use pre-made native plugins, or write custom native code to invoke native APIs at runtime and communicate with an existing web app.
Native Runtime: Capacitor vs Cordova
The way Web Native apps access the full native functionality available on modern mobile operating systems and devices is through what we call a "native runtime." A native runtime is a piece of technology that is essentially a custom web browser extended with the ability to access arbitrary native APIs on the platform, with a defined way to communicate between the web app and the native layer, and an API for building reusable pieces of native functionality called "plugins."
When exploring a native runtime for enterprise apps on the Ionic stack, one of the first decisions teams need to make is whether to use Cordova or Capacitor. Capacitor is the official native runtime for apps on the Ionic stack, and we strongly recommend it. Explore our Capacitor vs Cordova guide to learn more.
Using Native Plugins
Using a native plugin extends the functionality of your app with drop-in native code. These can range from very simple all the way up to very complex. Ionic's official enterprise solutions Identity Vault, Auth Connect, and Secure Storage are three examples of complex drop-in native plugins for Capacitor and Cordova.
Explore the Capacitor Plugins documentation for a list of official Capacitor plugins.
Accessing Native Features in Capacitor
Capacitor makes it easy to add small bits of custom native code to your app to extend the capabilities of your web app, and it works in a way that provides a consistent API across iOS, Android, and Web.
To learn more, explore the iOS and the Android custom native code Capacitor docs.
Additionally, the Capacitor ecosystem has many plugins available for drop-in functionality, and Capacitor has backwards compatible support with a large number of existing Cordova plugins.