From ee123b07b902aa4c647345a058c86be5f442d470 Mon Sep 17 00:00:00 2001 From: StanleyCocos Date: Wed, 2 Oct 2024 20:42:39 +0800 Subject: [PATCH] chore(messaging, ios): correct variable naming of native (#13429) * fix(messaging, ios): correct variable naming * fix(messaging, ios): correct variable naming --- .../ios/Classes/FLTFirebaseMessagingPlugin.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/firebase_messaging/firebase_messaging/ios/Classes/FLTFirebaseMessagingPlugin.m b/packages/firebase_messaging/firebase_messaging/ios/Classes/FLTFirebaseMessagingPlugin.m index 2b42dfdcbbdf..67ee0ab23997 100644 --- a/packages/firebase_messaging/firebase_messaging/ios/Classes/FLTFirebaseMessagingPlugin.m +++ b/packages/firebase_messaging/firebase_messaging/ios/Classes/FLTFirebaseMessagingPlugin.m @@ -33,7 +33,7 @@ @implementation FLTFirebaseMessagingPlugin { BOOL _initialNotificationGathered; FLTFirebaseMethodCallResult *_initialNotificationResult; - NSString *_initialNoticationID; + NSString *_initialNotificationID; NSString *_notificationOpenedAppID; #ifdef __FF_NOTIFICATIONS_SUPPORTED_PLATFORM @@ -220,7 +220,7 @@ - (void)application_onDidFinishLaunchingNotification:(nonnull NSNotification *)n // If remoteNotification exists, it is the notification that opened the app. _initialNotification = [FLTFirebaseMessagingPlugin remoteMessageUserInfoToDict:remoteNotification]; - _initialNoticationID = remoteNotification[@"gcm.message_id"]; + _initialNotificationID = remoteNotification[@"gcm.message_id"]; } _initialNotificationGathered = YES; [self initialNotificationCallback]; @@ -357,7 +357,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center // We only want to handle FCM notifications and stop firing `onMessageOpenedApp()` when app is // coming from a terminated state. if (_notificationOpenedAppID != nil && - ![_initialNoticationID isEqualToString:_notificationOpenedAppID]) { + ![_initialNotificationID isEqualToString:_notificationOpenedAppID]) { NSDictionary *notificationDict = [FLTFirebaseMessagingPlugin remoteMessageUserInfoToDict:remoteNotification]; [_channel invokeMethod:@"Messaging#onMessageOpenedApp" arguments:notificationDict]; @@ -1036,7 +1036,7 @@ - (nullable NSDictionary *)copyInitialNotification { // Only return if initial notification was sent when app is terminated. Also ensure that // it was the initial notification that was tapped to open the app. if (_initialNotification != nil && - [_initialNoticationID isEqualToString:_notificationOpenedAppID]) { + [_initialNotificationID isEqualToString:_notificationOpenedAppID]) { NSDictionary *initialNotificationCopy = [_initialNotification copy]; _initialNotification = nil; return initialNotificationCopy;