I am trying to configure OneSignal React Native in a React Native application for push notification purposes.
Environment Setup
I followed the steps below from the official documentation of React native one signal for setting it up:
step 1 : npm install -g react-native-cli
,
status : done
step 2 : react-native init OneSignalDemo
,
status : done
Before linking the project I ran my project successfully with the commands below:
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
react-native run-android
step 3: While linking my library with react-native link react-native-onesignal
I got an error in my terminal.
Linking oneSignal with my App (As per official documentation),
status : fail
Error:
Package react-native-onesignal has been ignored because it contains invalid configuration.
Reason: Unknown option dependency.platforms.ios.sourceDir with value ""./ios"" was found.
This is either a typing error or a user mistake
One possible solution that I tried was to create new React Native project with version 0.58.0 as per documentation, but I keep getting the same error.
i got the warn message but simple npm i solved the issue for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With