Getting Started Guide
Signup
Ionic Portals requires a product key to use. Getting a key is easy. Just head to the Ionic Dashboard and click "Get Access".
This will present you with a form asking for some additional information. After submitting the page will refresh and you will immediately see the key that can be used to unlock the use of Portals in your app.
You can always use this shareable link to signup for a Product Key: ionic.io/register-portals
Install
Ionic Portals is publicly available via Maven Central, Cocoapods, SPM, and NPM.
- React Native
- Web
To add Portals to your web project, install it via NPM:
npm install @ionic/[email protected]
To add Portals to your React Native project, install it via NPM:
npm install @ionic/[email protected]
Configure
After installing the dependency you need to register your copy of Ionic Portals at runtime. This works both offline and in production. You'll need to call register(myApiKey) before rendering any Portals in your app. Below is a simple example of how to bootstrap Ionic Portals before loading any Portal instances in your app. To get an API Key, refer to the Sign Up section.
import { register } from "@ionic/portals-react-native";
await register("YOUR_PORTALS_KEY");
Avoid committing your Portals key to source code repositories where it may be publicly visible!
On Android, you can use the Secrets Gradle Plugin to keep it out of a public repository.
On iOS, you can use an .xcconfig
file to keep it out of a public repository.
Supported Platform Versions
Platform | Latest Portals Version | Minimum Supported Platform Version |
---|---|---|
iOS | 0.11.0 | iOS 13.0 |
Android | 0.10.0 | Android SDK 22 |
React Native | 0.7.0 | React Native 0.74.2 |