Use of undeclared identifier 'FCMNotificationReceived'
See original GitHub issueAfter following your installation guide (following the ‘Non Cocoapod approach’), and pasting in this code:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))handler {
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:notification];
handler(UIBackgroundFetchResultNewData);
}
I get the following error: Use of undeclared identifier 'FCMNotificationReceived'
Any idea why?
Pretty sure I added all the files the right way.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Use of undeclared identifier 'RNFirebaseNotifications ...
fb login SDKs it was working fine but now starting giving these errors. My imports are like this #import "AppDelegate.h" #import <React/ ...
Read more >Push Notification using React Native and Firebase – Part 3
Now, we need to run the application on our mobile. The first time we run, it will ask for the permission to send...
Read more >'RCTLog.h' file not found & Us… | Apple Developer Forums
'RCTLog.h' file not found & Use of undeclared identifier 'RNBRANCH_VERSION' build-time error while creating an archive for iOS app.
Read more >react-native-fcm-tr - npm
React Native bridge for firebase cloud messaging (FCM). Latest version: 1.1.0, last published: a year ago. Start using react-native-fcm-tr ...
Read more >Migration/3.x problem: undeclared identifier FIRUserInfo
I've hit one snag so far: "Use of undeclared identifier FIRUserInfo". I've made sure my podfile includes auth -- I see "Using FirebaseAuth ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@evollu actually i was following this tutorial for push notification where i got this error. http://nobrok.com/push-notification-using-react-native-and-firebase-part-3/
so for those who are following this tutorial and have this issue then replace the code
*** with this ****
(void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{ [RNFIRMessaging didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler]; }
for people with zero knowledge of Objective C like me you have add an “-” before @evollu answer eg
it took me 40 minuts to find out 😃