From 0db7f0c40ab1c3a90c860588a5a92e6e26e7bc50 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Fri, 10 Mar 2023 21:19:45 +0100 Subject: [PATCH] Update based on Expo's template --- ios/tooot/AppDelegate.h | 4 +--- ios/tooot/AppDelegate.mm | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ios/tooot/AppDelegate.h b/ios/tooot/AppDelegate.h index c1f4f9fa..1658a437 100644 --- a/ios/tooot/AppDelegate.h +++ b/ios/tooot/AppDelegate.h @@ -1,9 +1,7 @@ -#import #import #import - #import -@interface AppDelegate : RCTAppDelegate +@interface AppDelegate : EXAppDelegateWrapper @end diff --git a/ios/tooot/AppDelegate.mm b/ios/tooot/AppDelegate.mm index bb0106f9..f4620220 100644 --- a/ios/tooot/AppDelegate.mm +++ b/ios/tooot/AppDelegate.mm @@ -51,4 +51,22 @@ restorationHandler:restorationHandler]; } +// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken +{ + return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; +} + +// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries +- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error +{ + return [super application:application didFailToRegisterForRemoteNotificationsWithError:error]; +} + +// Explicitly define remote notification delegates to ensure compatibility with some third-party libraries +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler +{ + return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler]; +} + @end \ No newline at end of file