Skip to content

Commit 743629e

Browse files
committed
Merge branch 'main' into v0.0.6-rc
2 parents 21fb122 + ec3f093 commit 743629e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
Expo config plugin to add widgets and live activities to a React Native app
44

5-
The widgets still need to be written in Swift (I think there's no way around that). But you can simply add a folder with Swift files to a React Native project (see folder \_widgets in this repository for examples) and then add the plugin via:
5+
The widgets still need to be written in Swift (I think there's no way around that). But you can simply add a folder with Swift files to a React Native project and then add the plugin via:
66

77
```sh
88
npx expo install react-native-widget-extension
99
```
1010

11-
And add the following config to app.json (where widgetsFolder is the path to the folder with the Swift files):
11+
And add the following config to app.json (where `widgetsFolder` is the path to the folder with the Swift files):
1212

1313
```json
1414
"expo": {
1515
"name": "my-app",
1616
"plugins": [
1717
[
1818
"react-native-widget-extension",
19-
{ "frequentUpdates": true, "widgetsFolder": "_widgets/PizzaDelivery" },
19+
{ "frequentUpdates": true, "widgetsFolder": "SampleWidgetExtension" },
2020
],
2121
]
2222
}
@@ -37,18 +37,18 @@ startActivity(3, "4343", "$32.23", driverName, 47, 43);
3737

3838
## Plugin configuration options
3939

40-
- frequentUpdates (boolean, default: false): Depending on this param, NSSupportsLiveActivitiesFrequentUpdates will be set
41-
- widgetsFolder (string, default: "widgets"): Path from the project root to the folder containing the Swift widget files
42-
- deploymentTarget (string, default: "16.2"): The minimum deployment target for the app
43-
- groupIdentifier (string): The app group identifier which is required for communication with the main app. Must start with `group.`
40+
- `frequentUpdates` (boolean, default: false): Depending on this param, NSSupportsLiveActivitiesFrequentUpdates will be set
41+
- `widgetsFolder` (string, default: "widgets"): Path from the project root to the folder containing the Swift widget files
42+
- `deploymentTarget` (string, default: "16.2"): The minimum deployment target for the app
43+
- `groupIdentifier` (string): The app group identifier which is required for communication with the main app. Must start with `group.`
4444
<!--
4545
- moduleFileName (string, default: "Module.swift"): File within the widget folder that defines the native module
4646
- attributesFileName (string): File within the widget folder that defined the widget attributes
4747
-->
4848

4949
## Example
5050

51-
For a minimal example app, see the folder **example**. Example code for widgets can be found in the \*\*\_widgets\_\_ folder.
51+
For a minimal example app, see the folder **example**. Example code for a widget and live activity can be found in **example/SampleWidgetExtension**. To run the example, you'll need to `bun run build` in the root directory.
5252

5353
Some background on how the **PizzaDelivery** example works:
5454

0 commit comments

Comments
 (0)