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
Copy file name to clipboardExpand all lines: docs/docs/docs/getting-started/expo.mdx
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ import { PackageManagerTabs } from '@theme';
5
5
This guide walks you through packaging your Expo React Native app as an **AAR** or **XCFramework** and integrating it into your native **Android** or **iOS** application.
6
6
7
7
## Prerequisites
8
+
8
9
- Install the `@callstack/react-native-brownfield` package from the quick start [section](/docs/getting-started/quick-start#installation)
9
10
10
11
## Configuration
@@ -13,9 +14,7 @@ This guide walks you through packaging your Expo React Native app as an **AAR**
13
14
14
15
```json
15
16
{
16
-
"plugins": [
17
-
"@callstack/react-native-brownfield",
18
-
]
17
+
"plugins": ["@callstack/react-native-brownfield"]
19
18
}
20
19
```
21
20
@@ -55,7 +54,7 @@ This should only take a few minutes.
55
54
56
55
> That is all from the AAR steps. We can now consume the AAR inside a native Android App.
57
56
58
-
### AAR: Present RN UI
57
+
### AAR: Present RN UI
59
58
60
59
1. Call the `ReactNativeHostManager.initialize` in your Activity or Application:
61
60
@@ -80,6 +79,7 @@ override fun onConfigurationChanged(newConfig: Configuration) {
80
79
```
81
80
82
81
3. Use either of the following APIs to present the UI:
82
+
83
83
- ReactNativeFragment
84
84
- See the example [here](https://github.com/callstack/react-native-brownfield/blob/41c81059acda8b134b6fea6bbbcf918c20d16552/apps/AndroidApp/app/src/main/java/com/callstack/brownfield/android/example/MainActivity.kt#L133)
85
85
- ReactNativeFragment.createReactNativeFragment
@@ -90,7 +90,7 @@ override fun onConfigurationChanged(newConfig: Configuration) {
90
90
91
91
4. Build and install the android application 🚀
92
92
93
-
<hr/>
93
+
<hr/>
94
94
95
95
## iOS Integration
96
96
@@ -109,23 +109,23 @@ This should only take a few minutes.
109
109
##### Pre-Requisites
110
110
111
111
- Follow the step for adding the frameworks to your iOS App - [here](/docs/getting-started/ios#6-add-the-framework-to-your-ios-app)
112
-
<hr/>
112
+
<hr/>
113
113
114
114
1. Call the following functions from your Application Entry point:
115
115
116
116
```swift
117
117
@main
118
118
structIosApp: App {
119
119
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
@@ -286,35 +290,83 @@ export function copyBundleReactNativePhase(
286
290
}
287
291
}
288
292
289
-
functionresolveErrorMessageForAppTargetName(
290
-
applicationTargets: string[]
291
-
): string{
292
-
returnapplicationTargets.length>1
293
-
? `Multiple iOS application targets found in the Xcode project (${applicationTargets.join(', ')}). Please set ios.appTargetName in plugin options.`
294
-
: 'Could not determine the iOS app target name from the Xcode project. Please set `ios.appTargetName` in the `react-native-brownfield` plugin configuration in your Expo config (for example, app.json).';
0 commit comments