From 51e1726f789f9fe947042d1e473c05c568d31728 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 6 Apr 2023 11:57:35 -0300 Subject: [PATCH] enable deep link and notifications --- ios/RocketChatRN/AppDelegate.mm | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/ios/RocketChatRN/AppDelegate.mm b/ios/RocketChatRN/AppDelegate.mm index b3aa2a573..c164be927 100644 --- a/ios/RocketChatRN/AppDelegate.mm +++ b/ios/RocketChatRN/AppDelegate.mm @@ -3,9 +3,9 @@ #import // #import #import -// #import "RNNotifications.h" + #import "RNNotifications.h" #import "RNBootSplash.h" -// #import "Orientation.h" + #import "Orientation.h" #import #import #import @@ -91,7 +91,7 @@ self.initialProps = @{}; [super application:application didFinishLaunchingWithOptions:launchOptions]; -// [RNBootSplash initWithStoryboard:@"LaunchScreen" rootView:self.window.rootViewController.view]; + [RNBootSplash initWithStoryboard:@"LaunchScreen" rootView:self.window.rootViewController.view]; return YES; } @@ -155,32 +155,32 @@ // } // #endif -// - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken -// { -// [RNNotifications didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; -// } + - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken + { + [RNNotifications didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; + } -// - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { -// [RNNotifications didFailToRegisterForRemoteNotificationsWithError:error]; -// } + - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { + [RNNotifications didFailToRegisterForRemoteNotificationsWithError:error]; + } -// - (BOOL)application:(UIApplication *)application -// openURL:(NSURL *)url -// options:(NSDictionary *)options -// { -// return [RCTLinkingManager application:application openURL:url options:options]; -// } + - (BOOL)application:(UIApplication *)application + openURL:(NSURL *)url + options:(NSDictionary *)options + { + return [RCTLinkingManager application:application openURL:url options:options]; + } -// - (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity -// restorationHandler:(nonnull void (^)(NSArray> * _Nullable))restorationHandler -// { -// return [RCTLinkingManager application:application -// continueUserActivity:userActivity -// restorationHandler:restorationHandler]; -// } + - (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity + restorationHandler:(nonnull void (^)(NSArray> * _Nullable))restorationHandler + { + return [RCTLinkingManager application:application + continueUserActivity:userActivity + restorationHandler:restorationHandler]; + } -// - (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window -// { -// return [Orientation getOrientation]; -// } + - (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window + { + return [Orientation getOrientation]; + } @end