So first some context, we are in the process of migrating our firebase installation from react-native-firebase v5 to v6, mostly because the old package is deprecated (including the native SDK) so it could stop working at any moment.
Now the problem is that react-native-firebase v6 got rid of it's push-notification module, it still supports firebase messaging which should take care of remote push-notifications, however, we also need local scheduling functionality, the authors have recommended using react-native-push-notifications for this purpose.
However migrating both libraries is going to take some effort and we would like to do a slower migration, so my idea was:
- Integrate react-native-push-notifications while keeping firebase v5, migrate our local notification code to this library
- once we are sure everything is stable and we do some production testing, start migrating firebase v5 to v6, which will entail more work
Now, I'm trying to tackle 1), the problem is, that both libraries use the same underlaying callbacks on iOS to register the callbacks for push-notifications, ex:
from the iOSPushNotifications package
// Required to register for notifications- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings{ [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];}
and our current integration with firebase v5:
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings { [[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];}
I'm not a iOS developer, does anyone have any idea of how to register both libraries without them messing with each other? is this even possible? or is it necessary for us to update to v6 and user push-notifications at the same time?