delete access to UIApplicationLaunchOptionsLocalNotificationKey (#43114)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43114

Changelog: [iOS][Breaking]

PR#42628 introduced new behavior on how the react native infra tracks local notifications that start the app. in this PR, we are officially deleting the old implementation.

Reviewed By: ingridwang

Differential Revision: D52931617

fbshipit-source-id: 3b77479b0aacf239e45cfcc7d7c4b20e82e0b786
This commit is contained in:
Phillip Pan
2024-02-20 13:11:17 -08:00
committed by Facebook GitHub Bot
parent e9351f0f8a
commit 916dde4c60
@@ -565,27 +565,6 @@ RCT_EXPORT_METHOD(getInitialNotification
return;
}
NSMutableDictionary<NSString *, id> *initialRemoteNotification =
[self.bridge.launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] mutableCopy];
// The user actioned a remote notification to launch the app. This is a fallback that is deprecated
// in the new architecture.
if (initialRemoteNotification) {
initialRemoteNotification[@"remote"] = @YES;
resolve(initialRemoteNotification);
return;
}
UILocalNotification *initialLocalNotification =
self.bridge.launchOptions[UIApplicationLaunchOptionsLocalNotificationKey];
// The user actioned a local notification to launch the app. Notification is represented by UILocalNotification. This
// is deprecated.
if (initialLocalNotification) {
resolve(RCTFormatLocalNotification(initialLocalNotification));
return;
}
resolve((id)kCFNull);
}