aboutsummaryrefslogtreecommitdiff
path: root/ios/Frontend/AppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'ios/Frontend/AppDelegate.m')
-rw-r--r--ios/Frontend/AppDelegate.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/ios/Frontend/AppDelegate.m b/ios/Frontend/AppDelegate.m
index 31f06642..2b52605f 100644
--- a/ios/Frontend/AppDelegate.m
+++ b/ios/Frontend/AppDelegate.m
@@ -4,6 +4,7 @@
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import "RNSplashScreen.h"
+#import <Firebase.h>
#if DEBUG
#import <FlipperKit/FlipperClient.h>
@@ -26,12 +27,23 @@ static void InitializeFlipper(UIApplication *application) {
@implementation AppDelegate
+- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
+ fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
+ // If you are receiving a notification message while your app is in the background,
+ // this callback will not be fired till the user taps on the notification launching the application.
+
+ completionHandler(UIBackgroundFetchResultNewData);
+}
+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
#if DEBUG
InitializeFlipper(application);
#endif
+ if ([FIRApp defaultApp] == nil) {
+ [FIRApp configure];
+ }
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"Frontend"