Skip to content

Commit 6e895c3

Browse files
authored
fix: Suppress deprecation warnings for minimum of OS 26 (#2725)
## Summary: While Microsoft is still far away from dropping support for iOS 18, we want to get a head-start on handling deprecated APIs for the latest OS releases. Silence these deprecated API warnings when making macOS 26, iOS 26, and watchOS 26 our minimums. ## Test Plan: There is no change to actual code.
1 parent 337dff4 commit 6e895c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-native/Libraries/LinkingIOS/RCTLinkingManager.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ - (void)handleOpenURLNotification:(NSNotification *)notification
155155
RCT_EXPORT_METHOD(getInitialURL : (RCTPromiseResolveBlock)resolve reject : (__unused RCTPromiseRejectBlock)reject)
156156
{
157157
NSURL *initialURL = nil;
158+
#pragma clang diagnostic push // [macOS]
159+
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // [macOS]
158160
if (self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey]) {
159161
initialURL = self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey];
160162
} else {
@@ -164,6 +166,7 @@ - (void)handleOpenURLNotification:(NSNotification *)notification
164166
initialURL = ((NSUserActivity *)userActivityDictionary[@"UIApplicationLaunchOptionsUserActivityKey"]).webpageURL;
165167
}
166168
}
169+
#pragma clang diagnostic pop // [macOS]
167170
resolve(RCTNullIfNil(initialURL.absoluteString));
168171
}
169172

0 commit comments

Comments
 (0)