Issue: 🔥iOS firebase.notifications().getInitialNotification() on notification tap the app opens then exit unexpected


#1

does anyone know how to solve it?


#2

anyone?!?


#3

Having the same issues as well. The only person who deals with notifications on expo team is @bacon. Maybe he can help us out


#4

@fausto @ajgulati Unfortunately this functions differently to expo-firebase-notifications (RNFirebase but with compatibility for ExpoKit). I would imagine the issue is something to do with the AppDelegate, if you are sure that it is setup properly then perhaps there is a bug with that part of RNFirebase.


#5

@bacon this is what my appdelegate.m file looks like in Expo 32 since the introduction of EXStandaloneAppDelegate.m file. I am not sure what I could be missing here - I am kind of lost so any push to the right direction would helo


#import "AppDelegate.h"



#import <EXFirebaseNotifications/EXFirebaseNotifications.h>


#import <EXFirebaseMessaging/EXFirebaseMessaging.h>


@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    [EXFirebaseNotifications configure];

    
    return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler
{
    [[EXFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}

@end


#6

@fausto @bacon I made these changes to my files https://github.com/expo/expo/pull/3431/files

It should fix it


#7

@bacon @ajgulati I’m gonna have a look. I’m not using expo-firebase-notifications . Should it work with react-native-firebase + expo?


#8

Uow! @ajgulati @bacon
I tested this solution https://github.com/expo/expo/pull/3431/files as @ajgulati described on pull-request. It worked for me…


#9

Glad it worked