Created
August 8, 2019 00:25
-
-
Save katharinepadilha/094faea08c4e198fcff26d9997cfab7a to your computer and use it in GitHub Desktop.
AppDelegate to firebase setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Firebase.h> | |
#import "RNFirebaseNotifications.h" | |
#import "RNFirebaseMessaging.h" | |
//... | |
@implementation AppDelegate | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
//... | |
[FIRApp configure]; | |
[RNFirebaseNotifications configure]; | |
//... | |
} | |
//... | |
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { | |
[[RNFirebaseNotifications instance] didReceiveLocalNotification:notification]; | |
} | |
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo | |
fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{ | |
[[RNFirebaseNotifications instance] didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler]; | |
} | |
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings { | |
[[RNFirebaseMessaging instance] didRegisterUserNotificationSettings:notificationSettings]; | |
} | |
//... | |
@end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment