Ionic Portals aims to simplify the integration of web applications into native iOS and Android code


Ionic describes his new web view component, Ionic Portals, as a “supercharged” version of the native web view controls available on iOS and Android. It aims to make it easier for developers to integrate web applications with native code in an efficient manner.

Ionic Portals is based on Capacitor, a native runtime environment that enables the creation of hybrid native applications using JavaScript, HTML, and CSS. According to Ionic, Capacitor is a perfect solution for web developers who want to package their web applications as a native application. Instead, Ionic Portals focuses on the other half of the problem, that of app developers who need to integrate an existing web workflow, such as authenticating with a portal or product catalog, into a native app.

Features that Ionic Portals rely on the stored web view provided by the operating system include the ability to expose native capabilities to the web experience, a web-to-native communication bridge to consume the results produced by the web. web layer, the ability to program plugins to define new APIs to expose native capabilities and data to the web view, and more.

Portals are the fundamental abstraction of Ionic portals, providing the means to integrate a web application into a native application. You can integrate multiple web applications through different portals or embed different screens of the same web application into different portals.

According to Ionic, using Ionic Portals also helps native and web development teams collaborate better while keeping their respective responsibilities intact.

Portals apply good security practices to protect both developers and users. Native developers can set granular permissions that designate the parts of the native app that web teams can touch. With this feature, native and web teams can collaborate securely while ensuring that no unauthorized access to data or accidental overwriting of important features and data occurs.

The suggested method to add Ionic Portals to an iOS project is to use CocoaPods, placing the following dependency in your project Podfile:

pod 'IonicPortals', '~> 0.2.0'

Likewise, on Android, you add the Ionic Portals dependency to your build.gradle to file:

dependencies {
    implementation 'io.ionic:portals:0.2.0'
}

You can use the same approach to extend Ionic portals by including any of the Over 20 capacitor plugins, which provide access to the camera, clipboard, local file system, etc.

Once Ionic Portals is integrated into your project, you can initialize it by calling PortalManager.register() with your API key, then instantiate a portal with a locally stored web application while also initializing all required plugins:

PortalManager.newPortal("profile")
  .setStartDir("webapp")
  .addPlugin(CameraPlugin.class)
  .setInitialContext(initialContextProfile)
  .create();

Ionic Portals also supports the possibility of updating an application without a new review or version from the App Store.

Ionic portals is Open source but requires a free licence key.


Comments are closed.