react-native-onesignal
react-native-onesignal copied to clipboard
React Native 0.70.1 with Firebase latest, cannot run pod update
Description:
on new project with react-native 0.70.1
i cannot run pod update
after upgrading Firebase 9.6.0/latest
Environment
- "react-native-onesignal": "^4.4.1",
- npm
Steps to Reproduce Issue:
- Install react native via
npx react-native init testproject
2.. install Firebase vianpm install --save @react-native-firebase/app
- install onesignal via
npm install --save react-native-onesignal
same problem. When I use use_frameworks!
in podfile, this error appears.
target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
end
Enviroment "react": "18.0.0" "react-native": "^0.69.5" "@react-native-firebase/analytics": "^15.6.0" "@react-native-firebase/app": "^15.6.0"
My quick solution was downgrade to 14.11 untill firebase gets stable
Hi Guys, I step into this same error and fixed it replacing
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignal', '>= 3.0', '< 4.0'
end
with:
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignalXCFramework', '>= 3.11.1', '< 4.0'
end
in my Podfile. Hope this helps.
Hi everyone, thanks for your patience!
It sounds like @patricpfranca is using version 15.6.0 of Firebase. Is that the case with everyone else?
Please share the full podfile and the exact versions of firebase you are using. That will help us look into this.
Beginning with firebase-ios-sdk v9+ (react-native-firebase v15+) you must tell CocoaPods to use frameworks.
So we cannot work with firebase and one signal, so I am choosing firebase for now.
The incompatibility with firebase comes from firebase forcing this in the Podfile
use_frameworks! :linkage => :static
To get one signal to work along with firebase latest version, you need to also add this to the OneSignal target:
target 'OneSignalNotificationServiceExtension' do
use_frameworks! :linkage => :static
pod 'OneSignalXCFramework', '>= 3.0', '< 4.0'
end
then npx pod-install
Note that use_frameworks!
alone will not work.
Tested with react-native-firebase
17.5.0
, react-native
0.71.8
and react-native-onesignal
4.5.1
.
Should maybe be added to the documentation as a lot of app are using firebase.