Hello guys!
I am using Firebase Cloud Messaging.
On Android everything works perfect.
But on iOS nothing works (i mean remotely notification).
Do i need install "Firebase" package for iOS?
Same here!
You need to use APNs for iOS ;)
@Meph1k I'm looking at the apple developer docs for that, do I need to implement them natively or do they work with this library?
I use react-native-firebase – and now my app crashes ://
@rgetValue did you solve? I am seeing something similar?
@Jonovono nope :(((
react-native-firebase deprecated notifications, you can go back to version 5 but having old libraries doesn't sound well. I've ended up using https://github.com/wix/react-native-notifications but I've haven't got around to test iOS notifications since I don't have an apple paid developer account yet to set things up.
@eldroan In react-native-firebase i'm using onMessage method.
When this method fired up – i'm generate local notification.
But it's crash my app :///
I found a solution. Seems like I missed a few steps.
https://github.com/react-native-community/react-native-push-notification-ios
Make sure this is in your AppDelegte.m
#import <UserNotifications/UserNotifications.h>
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
...
// Define UNUserNotificationCenter
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
center.delegate = self;
return YES;
}
...
// Called when a notification is delivered to a foreground app.
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
}
@end
Then in Xcode to add push notification capability
Project Navigator > Signing and Capabilities > + Capability
Click that, and add Push Notifications capability
If you have automatic signing, xcode will do all the provisioning for you.
All configurations are done correctly, but still not working
All configurations are done correctly, but still not working
Same :/
All configurations are done correctly, but still not working
Same :/
Sorry for that but this library does not implement specific iOS code, so I think you can find a solution in rn-push-notification-ios.
Still same issue. I tried cloning the example project and followed installation steps in https://github.com/react-native-community/push-notification-ios but I am not able to receive remote notifications from firebase.
Most helpful comment
I found a solution. Seems like I missed a few steps.
https://github.com/react-native-community/react-native-push-notification-ios
Make sure this is in your AppDelegte.m
Then in Xcode to add push notification capability
Project Navigator > Signing and Capabilities > + Capability
Click that, and add Push Notifications capability
If you have automatic signing, xcode will do all the provisioning for you.