I am using firebase push notifications in my React native project. With the recent update (11.5.0), the application was no longer functional due to the changed functions. I also upgraded to 11.5.0. With the code I wrote below, it gives the following error on Android when buying FCM Token on IOS. What is the solution?
package.json
"@react-native-firebase/app": "^11.5.0",
"@react-native-firebase/messaging": "^11.5.0",
"react-native-push-notification": "^7.3.1",
import messaging from '@react-native-firebase/messaging';
const fcmToken = await messaging().getToken()
console.log('fcm token ', fcmToken);
Try add firebaseMessagingVersion = 21.1.0
in buildscript
of your app/build.gradle file
buildscript {
ext {
....
firebaseMessagingVersion = "21.1.0"
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.