Ionic Portals is a supercharged native Web View component for React Native that lets you add web-based experiences to native mobile apps. It enables native and web teams to better collaborate and bring new and existing web experiences to mobile in a safe, controlled way.
See our docs to get started with Portals.
React Native 0.87 added an opt-in mode where an iOS app uses Swift Package Manager instead of CocoaPods (npx react-native spm). This package ships a Package.swift for that mode. React Native marks the mode as experimental and not for production, and CocoaPods remains the supported integration.
In SwiftPM mode, Portals depends on Capacitor through capacitor-swift-pm. Add any Capacitor plugins your portals use through SwiftPM too, so the app links a single copy of Capacitor. If a plugin comes from CocoaPods while Portals comes from SwiftPM, the app links two copies of Capacitor and Portals skips the plugin with a not a CAPPlugin subclass message in the Xcode console.
React Native autolinks Capacitor plugins installed from npm, but it derives the Swift package name from the npm name (@capacitor/preferences becomes Preferences). Capacitor plugins name their package after the podspec (CapacitorPreferences), so resolution fails with product 'Preferences' ... not found. Until the plugin ships its own react-native.config.js, add one to it with patch-package, using the product name from the plugin's Package.swift:
// node_modules/@capacitor/preferences/react-native.config.js
module.exports = { spm: { name: 'CapacitorPreferences' } };
The Ionic Portals library for React Native requires a license key to use. Once you have integrated Portals into your project, login to your ionic account to get a key. See our doc on how to register for free and get your Portals license key and refer to the React Native getting started guides to see where to add your key.
Contact our sales team for more information about pricing.
See our license.
Ionic Portals is a solution that lets you add web-based experiences to your native mobile apps. Portals uses Capacitor as a bridge between the native code and the web code to allow for cross-communication between the two layers. Because Portals uses Capacitor under the hood, you are able to use any existing Capacitor Plugins while continuing to use your existing native workflow.
Ionic Framework is the open-source mobile app development framework that makes it easy to build top quality native and progressive web apps with web technologies. Your web experiences can be developed with Ionic, but it is not necessary to use Portals.
Generated using TypeDoc