React Native Firebase Cloud Messaging throwing errors on build for RN 0.63.4
I followed the instructions from here but the compilation is showing these errors. I'm guessing it's some sort of version incompatibility, but I believe I'm on the latest version of react-native-firebase
. When I build the app, these errors show up:
❌ /Users/matt/Desktop/myapp/node_modules/react-native-firebase/ios/RNFirebase/messaging/RNFirebaseMessaging.m:91:51: expected a type
- (void)applicationReceivedRemoteMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage {
^
❌ /Users/matt/Desktop/myapp/node_modules/react-native-firebase/ios/RNFirebase/messaging/RNFirebaseMessaging.m:99:28: expected a type
didReceiveMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage {
^
❌ /Users/matt/Desktop/myapp/node_modules/react-native-firebase/ios/RNFirebase/messaging/RNFirebaseMessaging.m:278:50: expected a type
- (NSDictionary*)parseFIRMessagingRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
^
❌ /Users/matt/Desktop/myapp/node_modules/react-native-firebase/ios/RNFirebase/messaging/RNFirebaseMessaging.m:44:30: property 'shouldEstablishDirectChannel' not found on object of type 'FIRMessaging *'
[FIRMessaging messaging].shouldEstablishDirectChannel = YES;
^
❌ /Users/matt/Desktop/myapp/node_modules/react-native-firebase/ios/RNFirebase/messaging/RNFirebaseMessaging.m:223:31: no visible @interface for 'FIRMessaging' declares the selector 'sendMessage:to:withMessageID:timeToLive:'
[[FIRMessaging messaging] sendMessage:data to:to withMessageID:messageId timeToLive:[ttl intValue]];
^
❌ /Users/matt/Desktop/myapp/node_modules/react-native-firebase/ios/RNFirebase/messaging/RNFirebaseMessaging.m:279:43: property 'appData' not found on object of type '__strong id'
NSDictionary *appData = remoteMessage.appData;
~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
** BUILD FAILED **
The following build commands failed:
CompileC /Users/matt/Library/Developer/Xcode/DerivedData/myapp-gpcpfeonrmwlebbsoklspvmumvzd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/x86_64/RNFirebaseFirestore.o /Users/matt/Desktop/myapp/node_modules/react-native-firebase/ios/RNFirebase/firestore/RNFirebaseFirestore.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/matthewrosendin/Library/Developer/Xcode/DerivedData/myapp-gpcpfeonrmwlebbsoklspvmumvzd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFirebase.build/Objects-normal/x86_64/RNFirebaseMessaging.o /Users/matt/Desktop/myapp/node_modules/react-native-firebase/ios/RNFirebase/messaging/RNFirebaseMessaging.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
Nothing was working, so I updated my Podfile as shown here
Here's my Podfile
:
...
platform :ios, '11.0'
target 'myapp' do
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
...
I tried removing these pods, as React Native >= 0.60 seems to do auto-linking.
In my package.json
:
...
"react-native-firebase": "^5.6.0",
"@react-native-firebase/app": "^10.8.1",
"@react-native-firebase/firestore": "^10.8.1",
"@react-native-firebase/messaging": "^10.8.1",
...
from Recent Questions - Stack Overflow https://ift.tt/3ktqmcs
https://ift.tt/eA8V8J
Comments
Post a Comment