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
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.
Most helpful comment
@siddhuchowdary Did you try
pod update? I ran that command and it solved my issue.