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: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,21 @@
2
2
3
3
Expo config plugin to add widgets and live activities to a React Native app
4
4
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:
6
6
7
7
```sh
8
8
npx expo install react-native-widget-extension
9
9
```
10
10
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):
- 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.`
44
44
<!--
45
45
- moduleFileName (string, default: "Module.swift"): File within the widget folder that defines the native module
46
46
- attributesFileName (string): File within the widget folder that defined the widget attributes
47
47
-->
48
48
49
49
## Example
50
50
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.
52
52
53
53
Some background on how the **PizzaDelivery** example works:
0 commit comments