React-native-fcm: Use of undeclared identifier 'FIRMessagingConnectionStateChangedNotification'

Created on 16 Apr 2018  路  3Comments  路  Source: evollu/react-native-fcm

I have successfully setup react-native-fcm on android but I can't get it to work on iOS.
I have followed the instructions in the readme but whenever I try to build, I get this error:

RNFIRMessaging.m:204:11: Use of undeclared identifier 'FIRMessagingConnectionStateChangedNotification'

and 7 other errors:

RNFIRMessaging.m:235:53: Property 'APNSToken' not found on object of type 'FIRMessaging *'
RNFIRMessaging.m:246:38: Property 'FCMToken' not found on object of type 'FIRMessaging *'
/RNFIRMessaging.m:510:93: Property 'isDirectChannelEstablished' not found on object of type 'FIRMessaging *'
/RNFIRMessaging.m:511:67: Property 'isDirectChannelEstablished' not found on object of type 'FIRMessaging *'
RNFIRMessaging.m:208:35: No visible @interface for 'FIRMessaging' declares the selector 'setDelegate:'
RNFIRMessaging.m:215:31: No visible @interface for 'FIRMessaging' declares the selector 'setShouldEstablishDirectChannel:'
RNFIRMessaging.m:220:39: No visible @interface for 'FIRMessaging' declares the selector 'isDirectChannelEstablished'

The errors are in RNFIRMessaging.m

React native version: 47.2.0
cocoapods version: 1.5.0
xcode version: 9.2
Building for iphone 5s

Most helpful comment

@siddhuchowdary Did you try pod update? I ran that command and it solved my issue.

All 3 comments

I updated the cocoapods and it works

@IElgohary how to Update the cocoapods,i have already updated cocoapods but still the above mentioned errors appears

React native version: 0.50.0
cocoapods version: 1.5.0
xcode version: 9.2
Building for iphone 5s

@siddhuchowdary Did you try pod update? I ran that command and it solved my issue.

Was this page helpful?
0 / 5 - 0 ratings