Обновление маркера push-уведомления Firebase не работает, т. Е. Прослушиватель событий APN TokenRefresh не срабатывает.
Уже добавлено:
didRegisterForRemoteNotificationsWithDeviceToken
, didRegisterUserNotificationSettings
добавлено в Appdeligate.m
, И добавлено firebase.messaging().onTokenRefresh
прослушиватель в app.js
App.js
firebase.messaging().onTokenRefresh
Appdeligate.m
-(void) userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
[[RNFirebaseMessaging instance] didReceiveRemoteNotification:response.notification.request.content.userInfo];
completionHandler();
}
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
{
[[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings];
}
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{}
didRegisterUserNotificationSettings
, didRegisterForRemoteNotificationsWithDeviceToken
происходит событие, но didReceiveRemoteNotification
не выполняется