Am trying to make push notifications (FCM) show up when app is in Foreground. Multiple manuals are referring to the below method. I can confirm it is being called when message is received, but notifications do not show up when app is in foreground (only background).
//To show a notification when the app is in foreground
-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
{
NSLog(@"completion handler, which is called but does not work");
completionHandler(UNNotificationPresentationOptionAlert + UNNotificationPresentationOptionSound);
}