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
First, we need to package our React Native app as an XCFramework or Fat-AAR.
53
53
54
-
#### With RNEF
54
+
#### With Rock
55
55
56
-
Follow [Integrating with Native Apps](https://www.rnef.dev/docs/brownfield/intro) steps in RNEF docs and run:
56
+
Follow [Integrating with Native Apps](https://www.rockjs.dev/docs/brownfield/intro) steps in Rock docs and run:
57
57
58
-
-`rnef package:ios` for iOS
59
-
-`rnef package:aar` for Android
58
+
-`rock package:ios` for iOS
59
+
-`rock package:aar` for Android
60
60
61
61
#### With custom scripts
62
62
63
-
Instead of using RNEF, you can create your own custom packaging scripts. Here are base versions for iOS and Android that you'll need to adjust for your project-specific setup:
63
+
Instead of using Rock, you can create your own custom packaging scripts. Here are base versions for iOS and Android that you'll need to adjust for your project-specific setup:
| application | Yes|`Application`| Main application.|
68
+
|reactHost| Exclusively*|`ReactHost`| An instance of [ReactHost](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt). |
69
+
| packages | Exclusively*|`List<ReactPackage>`| List of your React Native Native modules.|
|reactHost|`ReactHost`| null | An instance of [ReactHost](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactHost.kt). |
159
159
160
160
---
161
161
162
162
**Methods:**
163
163
164
164
`createView`
165
165
166
-
Creates a React Native view with a given module name. It automatically uses an instance of React Native created in `startReactNative` method. This is useful when embedding React Native views directly in your native layouts.
166
+
Creates a React Native view with a given module name. It automatically uses an instance of React Native created in `initialize` method. This is useful when embedding React Native views directly in your native layouts.
| context | Yes |`Context`| Android context to create the view |
173
+
| activity | No |`FragmentActivity`| Activity hosting the view, used for lifecycle management |
174
+
| moduleName | Yes |`String`| Name of React Native component registered to `AppRegistry`|
175
+
| launchOptions | No |`Bundle`| Initial properties to be passed to React Native component |
176
176
177
177
Returns:
178
178
`FrameLayout` - A view containing the React Native component.
@@ -193,7 +193,7 @@ container.addView(reactView);
193
193
194
194
#### `ReactNativeFragment`
195
195
196
-
An fragment rendering `ReactRootView` with a given module name. It automatically uses an instance of a React Native created in `startReactNative` method. It works well with exposed JavaScript module. All the lifecycles are proxied to `ReactInstanceManager`. It's the simplest way to embed React Native into your navigation stack.
196
+
An fragment rendering `ReactRootView` with a given module name. It automatically uses an instance of a React Native created in `initialize` method. It works well with exposed JavaScript module. All the lifecycles are proxied to `ReactInstanceManager`. It's the simplest way to embed React Native into your navigation stack.
0 commit comments