Skip to content

Commit 40a6572

Browse files
committed
docs: add plugin options
1 parent 6e00c6a commit 40a6572

1 file changed

Lines changed: 63 additions & 12 deletions

File tree

docs/docs/docs/getting-started/expo.mdx

Lines changed: 63 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,8 @@ This guide walks you through packaging your Expo React Native app as an **AAR**
1414
```json
1515
{
1616
"plugins": [
17-
[
18-
"@callstack/react-native-brownfield",
19-
{
20-
"ios": {
21-
"frameworkName": "BrownfieldLib"
22-
},
23-
"android": {
24-
"moduleName": "brownfieldlib"
25-
},
26-
"debug": true
27-
}
17+
"@callstack/react-native-brownfield",
2818
]
29-
]
3019
}
3120
```
3221

@@ -42,6 +31,8 @@ This guide walks you through packaging your Expo React Native app as an **AAR**
4231
}
4332
```
4433

34+
> The names `brownfieldlib` or `BrownfieldLib` are the default for AAR and Framework. You can configure different names, see [here](expo#plugin-options).
35+
4536
That is pretty much it from the configuration step. Now let's start with generating the AAR and later consuming it.
4637

4738
## Android Integration
@@ -164,3 +155,63 @@ let RNView = ReactNativeHostManager.shared.loadView(moduleName: "ExpoRNApp", ini
164155
You can see the demo integration in [Apple App](https://github.com/callstack/react-native-brownfield/blob/main/apps/AppleApp/Brownfield%20Apple%20App/BrownfieldAppleApp.swift) as well
165156

166157
4. Build and install the iOS application 🚀
158+
159+
<hr/>
160+
161+
## Plugin Options
162+
163+
You can pass plugin options through the second item in the `plugins` tuple in `app.json`:
164+
165+
```json
166+
{
167+
"plugins": [
168+
[
169+
"@callstack/react-native-brownfield",
170+
{
171+
"ios": {
172+
"frameworkName": "MyBrownfieldLib",
173+
"bundleIdentifier": "com.example.app.brownfield",
174+
...
175+
},
176+
"android": {
177+
"moduleName": "mybrownfieldlib",
178+
"packageName": "com.example.mybrownfieldlib",
179+
...
180+
}
181+
}
182+
]
183+
]
184+
}
185+
```
186+
187+
### iOS
188+
189+
- `frameworkName` (`string`, default: `"BrownfieldLib"`)
190+
- Name of the generated framework. This is also used as the XCFramework name.
191+
- `bundleIdentifier` (`string`, default: app bundle identifier + `.brownfield`)
192+
- Bundle identifier assigned to the generated framework.
193+
- `buildSettings` (`Record<string, string | boolean | number>`, optional)
194+
- Additional Xcode build settings applied when building the framework.
195+
- `deploymentTarget` (`string`, default: `"15.0"`)
196+
- Minimum iOS version supported by the generated framework.
197+
- `frameworkVersion` (`string`, default: `"1"`)
198+
- Framework version used for Apple build settings (must be an integer or floating point value, for example `"1"` or `"2.1"`).
199+
200+
### Android
201+
202+
- `moduleName` (`string`, default: `"brownfieldlib"`)
203+
- Name of the generated Android library module.
204+
- `packageName` (`string`, default: app package name)
205+
- Package name used for the Android library module.
206+
- `minSdkVersion` (`number`, default: `24`)
207+
- Minimum Android SDK supported by the library.
208+
- `targetSdkVersion` (`number`, default: `35`)
209+
- Target Android SDK version for the library.
210+
- `compileSdkVersion` (`number`, default: `35`)
211+
- Compile Android SDK version used to build the library.
212+
- `groupId` (`string`, default: package name)
213+
- Maven group ID used when publishing the AAR.
214+
- `artifactId` (`string`, default: module name)
215+
- Maven artifact ID used when publishing the AAR.
216+
- `version` (`string`, default: `"0.0.1-SNAPSHOT"`)
217+
- Maven version used when publishing the AAR.

0 commit comments

Comments
 (0)