You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ionic Portals is a supercharged native Web View component for iOS and Android that lets you add web-based experiences to React Native mobile apps. It enables React Native and web teams to better collaborate and bring new and existing web experiences to mobile in a safe, controlled way.
25
+
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.
22
26
23
27
## Getting Started
24
28
25
-
### Installation
26
-
`npm install @ionic/portals-react-native`
27
-
or
28
-
`yarn add @ionic/portals-react-native`
29
-
30
-
### Usage
31
-
Register Portals with your [product key](#Registration):
There are two methods you may use to ensure Portals can integrate into your React Native application: a custom `pre_install` hook or adding `use_frameworks!` to your Podfile. Only one of these approaches is needed to ensure that Capacitor is compiled as a dynamic framework.
103
-
104
-
**pre_install**
105
-
106
-
Using the `pre_install` hook allows you to keep all the other React Native dependencies as static frameworks:
Alternative to the `pre_install` hook, you can add `use_frameworks!` to your Podfile application target. Using this approach requires removing `use_flipper!()` from the Podfile.
128
-
129
-
### Communicating between React Native and Web
130
-
One of the key features of Ionic Portals for React Native is facilitating communication between the web and React Native layers of your application.
To see an example of Portals Pub/Sub in action that manages the lifecycle of a subscription with the lifecycle of a React Native component, refer to the [`PubSubLabel`](https://github.com/ionic-team/react-native-ionic-portals/blob/af19df0d66059d85ab8dde493504368c3bf39127/example/App.tsx#L53) implementation in the example project.
158
-
159
-
### Using Capacitor Plugins
160
-
If you need to use any Capacitor plugins, the classpath of the Android plugins will have to be provided to the `Portal``androidPlugins` property.
No configuration for iOS is needed since plugins are automatically registered when the Capacitor bridge initializes on iOS.
174
-
175
-
### Bundling Your Web Apps
176
-
Currently there is no tooling for bundling your web apps directly as part of @ionic/portals-react-native. Please follow the [native guides](https://ionic.io/docs/portals/how-to/pull-in-web-bundle#setup-the-web-asset-directory) to manage this as part of the native build process.
29
+
See our docs to [get started with Portals](https://ionic.io/docs/portals/getting-started/guide).
177
30
178
31
## Registration
179
32
180
-
Ionic Portals for React Native requires a 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](https://ionic.io/docs/portals/how-to/get-a-product-key) and refer to the [usage](#Usage) section on how to add your key to your React Native application.
33
+
The Ionic Portals library for React Native requires a **free** 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](https://ionic.io/docs/portals/how-to/get-a-product-key) and refer to the [React Native](https://ionic.io/docs/portals/getting-started/react-native) getting started guides to see where to add your key.
181
34
182
35
## FAQ
183
36
@@ -191,7 +44,6 @@ See our [license](https://github.com/ionic-team/ionic-portals/blob/main/LICENSE.
191
44
192
45
### How is Portals Related to Capacitor and Ionic?
193
46
194
-
Ionic Portals is a solution that lets you add web-based experiences to your native mobile apps. Portals uses [Capacitor](https://capacitorjs.com) 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](https://capacitorjs.com/docs/plugins)and even most [Cordova Plugins](https://capacitorjs.com/docs/plugins/cordova)while continuing to use your existing native workflow. Portals for React Native brings these capabilities to React Native applications.
47
+
Ionic Portals is a solution that lets you add web-based experiences to your native mobile apps. Portals uses [Capacitor](https://capacitorjs.com) 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](https://capacitorjs.com/docs/plugins) while continuing to use your existing native workflow.
195
48
196
49
[Ionic Framework](https://ionicframework.com/) 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.
0 commit comments