Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

Not Receiving Firebase push Notification in Background and in Appdelegate

$
0
0

My Appdelegate contains method didReceiveRemoteNotification

I was receiving logs and everything was working fine a day before.

Today again when I upload my p8 certificate to my firebase IOS app. only foreground App are showing. But I am not getting logs from Appdelegate file.

Also previously i was receiving foreground notification in firebase.notifications().onNotification((notification) => {})

but now i am geeting them in firebase.messaging().onMessage((message) => {}) method.

Overall there's no Background notifications.

My APPdelegate :

 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo    fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{ NSLog(@"Here"); if([[userInfo objectForKey:@"UID"] isEqual: @"VideoMeeting"]){    NSLog(@" contains type Here");     if( [UIApplication sharedApplication].applicationState == UIApplicationStateInactive || [UIApplication sharedApplication].applicationState == UIApplicationStateBackground )    {      NSLog(@"Here 22");      [self localNotificationRingerViewAdd:userInfo];    }else{      NSLog(@"Normal Noti 22");      [[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];    }  }else{        NSLog(@"Normal Noti 42");       [[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];  }}

Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>