ReactNative Firebase云消息传递错误

时间:2019-11-25 08:22:34

标签: firebase react-native firebase-cloud-messaging

我正在使用下面的插件来实现云消息传递。 https://github.com/invertase/react-native-firebase/tree/master/packages/messaging

不幸的是,此插件最近更新了,他们没有发布新文档。 https://invertase.io/oss/react-native-firebase/v6/messaging

以前,我曾经在AppDelegate中使用下面的代码,但是现在我不确定如何使用新的类RNFBMessaging ...

  

[RNFirebaseNotifications配置];

     
      
  • (BOOL)应用程序:(UIApplication *)app openURL:(NSURL *)url选项:(NSDictionary *)options {
      返回[[LineSDKLogin sharedInstance] handleOpenURL:url]; }

  •   
  • (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
      [[RNFirebaseNotifications实例]   didReceiveLocalNotification:notification]; }

  •   
  • (void)应用程序:(UIApplication *)应用程序didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo   fetchCompletionHandler :(非null无效   (^)(UIBackgroundFetchResult))completionHandler {
      [[RNFirebaseNotifications实例]   didReceiveRemoteNotification:userInfo   fetchCompletionHandler:completionHandler]; }

  •   
  • (void)应用程序:(UIApplication *)应用程序didRegisterUserNotificationSettings:(UIUserNotificationSettings   *)notificationSettings {[[[RNFirebaseMessaging实例] didRegisterUserNotificationSettings:notificationSettings]; }

  •   

我相信有人已经实现了这个新版本的插件... 请帮助我...

0 个答案:

没有答案