Skip to main content

Overview

Super Capacitor is a Capacitor plugin designed to allow Capacitor apps to utilize the capabilities of Ionic Portals.

Install

npm install @ionic-enterprise/super-capacitor
npx cap sync

Types

PortalOptions

The options for configuring your portal when using presentPortal.

interface PortalOptions {
name: string;
presentationType: 'push' | 'modal';
startDir?: string;
initialContext?: InitialContext;
plugins?: CapacitorPlugin[];
liveUpdateConfig?: LiveUpdateConfig;
modalStyle?: 'fullScreen' | 'pageSheet';
}

CapacitorPlugin

If you need to use any Capacitor plugins, the classpath of the Android plugins and the Objective-C class name will have to be provided to PortalOptions in the plugins property.

interface CapacitorPlugin {
/** The classpath of the plugin to be used in Android. (e.g. com.capacitorjs.plugins.camera.CameraPlugin) */
androidClassPath: string;
/** The class name of the plugin to be used in iOS.
* This must be the name as it is exposed to the Objective-C runtime.
* For example, The CameraPlugin swift class is exposed to Objective-C as CAPCameraPlugin.
*/
iosClassName: string;
}

Methods

presentPortal

presentPortal(options: PortalOptions) => Promise<void>

Usage

import { presentPortal } from '@ionic-enterprise/super-capacitor/superapp';

presentPortal({ name: 'checkoutApp', startDir: 'portals/checkout', type: 'push' });

Parameters

NameTypeDescription
optionsPortalOptionsThe PortalOptions object to configure the portal.

dismissPortal

dismissPortal() => Promise<void>

Usage

import { dismissPortal } from '@ionic-enterprise/super-capacitor/miniapp';

dismissPortal();