Example Expo managed project with widget, module to control it and config plugin
- Create expo project
npx create-expo-app <your_app_name>
- Install
expo-dev-client
npx expo install expo-dev-client
- Add local expo modules
npx create-expo-module@latest --local
- Remove unnecessary files (web and views) from
modules/<module_name>/iosandmodules/<module_name>/android - Copy source code from
modules/widget/android/src/main/java/expo/modules/widget/WidgetModule.kt,modules/widget/ios/WidgetModule.swiftandmodules/widget/index.ts - Copy
pluginfolder - Copy
app.plugin.js - Update
app.jsonand add apple team id indevTeamIdproperty - Run
npx expo prebuild
- Run
npx expo run:ios
or
npx expo run:android
To run it, you only need the build folder. If you want to edit the plugin files, you need to rebuild the plugin with https://www.npmjs.com/package/expo-module-scripts package or your own command.