[FIRApp configure];
[[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];
I am getting use of undeclared identifier error in AppDelegate.m file and not able to resolve it.
We got the same over here, let try to fix this quickly.
The issue is related to the latest version of react-native-fcm 2.4.0. If you downgrade to 2.3.3 for now you can continue working on your project.
It looks like the error seems related to the firebase change in the latest commit (b997199c94696b5d2db854b6f77a1310f872a1fa). See this stackoverflow thread
Thanks @DannyvanderJagt . I have downgraded it to 2.3.3 but now i am getting error in
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self + userInfo:notification.userInfo];
use of undeclared identifier userInfo.
Add
@import Firebase;
to your AppDelegate.m
No Luck still getting the same error.Its working on android devices though.
@pankaj-ag cannot be. Update your pod, like this -
pod update
pod repo update
Firebase should be latest version.
Your podfile should look like this:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'salonRescueMe2' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for salonRescueMe2
pod 'Firebase/Messaging'
target 'salonRescueMe2Tests' do
inherit! :search_paths
# Pods for testing
end
end
In your appdelegate.m you should add
@import Firebase;
This works for me, latest version of fcm, react native 38, pods:
Using Firebase (3.10.0)
Using FirebaseAnalytics (3.6.0)
Using FirebaseCore (3.4.5)
Using FirebaseInstanceID (1.0.8)
Using FirebaseMessaging (1.2.1)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 8 total pods installed.
should be fixed in master
released. close if it works fine
pls reopen if it still broken. released
I get the error while not using pods I am on React Native 56 and the latest react-native-fcm