0.1.2 • Published 6 months ago
react-native-widget-sync v0.1.2
The development of the npm module has been temporarily postponed.
react-native-widget-sync
The module allows refreshing and sharing of data between the main application and the widget.
Usage in expo managed project
See https://github.com/pafry7/widget-expo-example
Setup
- Clone repo
git clone git@github.com:pafry7/react-native-widget-sync.git
- Install dependencies
cd react-native-widget-sync
yarn
cd example
yarn
- Configure expo plugin in
/example
Add inapp.json
"ios": {
...
"entitlements": {
"appGroupIdentifier": <app group>
},
},
"plugins": {
[
"react-native-widget-sync",
{
"widgetName": <Your widget name>
"ios": {
"devTeamId": <Your apple team identifier>
"appGroupIdentifier": <app group>"
}
}
],
}
Running the example
Run
npx expo prebuild
and then
npx expo run:[ios|android]
How does it work
When you run expo prebuild for the first time, it generates a folder containing the source files for widgets and then copies them to both the ios and android directories. Remember to run prebuild each time you make changes to the widget's source files.