Skip to content

Commit 3e10a91

Browse files
eschwiebSaadnajmi
authored andcommitted
fix: Suppress deprecation warnings for minimum of OS 26 (microsoft#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 45d3103 commit 3e10a91

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
@@ -154,6 +154,8 @@ - (void)handleOpenURLNotification:(NSNotification *)notification
154154
RCT_EXPORT_METHOD(getInitialURL : (RCTPromiseResolveBlock)resolve reject : (__unused RCTPromiseRejectBlock)reject)
155155
{
156156
NSURL *initialURL = nil;
157+
#pragma clang diagnostic push // [macOS]
158+
#pragma clang diagnostic ignored "-Wdeprecated-declarations" // [macOS]
157159
if (self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey]) {
158160
initialURL = self.bridge.launchOptions[UIApplicationLaunchOptionsURLKey];
159161
} else {
@@ -163,6 +165,7 @@ - (void)handleOpenURLNotification:(NSNotification *)notification
163165
initialURL = ((NSUserActivity *)userActivityDictionary[@"UIApplicationLaunchOptionsUserActivityKey"]).webpageURL;
164166
}
165167
}
168+
#pragma clang diagnostic pop // [macOS]
166169
resolve(RCTNullIfNil(initialURL.absoluteString));
167170
}
168171

0 commit comments

Comments
 (0)