From b29c7014ae3a867377944949a6fedb82cffd96ec Mon Sep 17 00:00:00 2001 From: kanyanat Date: Tue, 2 Dec 2025 16:01:20 +0700 Subject: [PATCH] update AppDelegate for push noti ios --- ios/csareactrn60/AppDelegate.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ios/csareactrn60/AppDelegate.mm b/ios/csareactrn60/AppDelegate.mm index 3704cd3..2a92ecd 100644 --- a/ios/csareactrn60/AppDelegate.mm +++ b/ios/csareactrn60/AppDelegate.mm @@ -89,4 +89,13 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response completionHandler(); } +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + [FIRMessaging messaging].APNSToken = deviceToken; +} + +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { + [[FIRMessaging messaging] appDidReceiveMessage:userInfo]; + completionHandler(UIBackgroundFetchResultNoData); +} + @end