I'd love to install Notifee for my Expo project since I would need local and remote push notifications to interact with users in my app (iOS/Android).
I follow the instruction on the website and I can see Notifee as installed in my package.json file
{
"name": "etmhomecrossexpo",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@notifee/react-native": "^7.8.2",
"@react-native-async-storage/async-storage": "^1.23.1",
"@react-navigation/native": "^6.1.14",
"@react-navigation/native-stack": "^6.9.22",
"@types/react": "~18.2.45",
"expo": "~50.0.11",
"expo-application": "~5.8.3",
"expo-build-properties": "~0.11.1",
"expo-dev-client": "~3.3.9",
"expo-device": "~5.9.4",
"expo-screen-orientation": "~6.4.1",
"expo-status-bar": "~1.11.1",
"highcharts": "^11.4.0",
"i18next": "^23.10.1",
"moment-timezone": "^0.5.45",
"react": "18.2.0",
"react-i18next": "^14.1.0",
"react-native": "0.73.6",
"react-native-base64": "^0.2.1",
"react-native-change-icon": "^5.0.0",
"react-native-device-info": "^10.13.1",
"react-native-localize": "^3.0.6",
"react-native-modal": "^13.0.1",
"react-native-pager-view": "^6.2.3",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-sqlite-storage": "^6.0.1",
"react-native-webview": "^13.8.4",
"react-native-xml2js": "^1.0.3",
"semver": "^7.6.3",
"typescript": "^5.3.0",
"xml-formatter": "^3.6.2",
"xml-js": "^1.6.11",
"xml2js": "^0.6.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@react-native-community/datetimepicker": "^7.6.3",
"@react-native-picker/picker": "^2.7.2",
"react-native-wheel-pick": "^1.2.2"
},
"private": true
}
after that I add just the import line in one of my app file
import notifee from '@notifee/react-native';
Now I want to try it on my devices (both Android and iPhone). On Android I got no problem after an npx expo run:android and it runs, instead my iOS app doesn't not build: I tried to build using eas build --platform ios --local and I got this
Fastlane is not available, make sure it's installed and in your PATH spawn fastlane ENOENT npx exited with non-zero code: 1
Also trying to use and old development build and trying to run using my own dev server with npx expo start --dev-client I got errors:
ERROR Error: Notifee native module not found.
ERROR Invariant Violation: "main" has not been registered. This can happen if:
Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
A module failed to load due to an error and AppRegistry.registerComponent wasn't called.
› Stopped server
After a bit of searching on the web I have not found a solution, do you have any suggestions for me?
Thank you in advance
Unfortunatelly the docs on website for Notifee are outdated.
Please refer to source documentation on Github.