Skip to content

Commit

Permalink
fix: remove @available for RCTKeyWindow check (#46510)
Browse files Browse the repository at this point in the history
Summary:
This PR removes `available` for `RCTKeyWindow` after minimum version bump to iOS 15 this check is not needed anymore.

## Changelog:

[IOS] [REMOVED] - remove available for RCTKeyWindow check

Pull Request resolved: #46510

Test Plan: CI Green

Reviewed By: rshest

Differential Revision: D62752434

Pulled By: javache

fbshipit-source-id: 7b7745d4f27128cdb66053f7fa1cc234435eac31
  • Loading branch information
okwasniewski authored and facebook-github-bot committed Sep 16, 2024
1 parent 4e1d701 commit e98c221
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions packages/react-native/React/Base/RCTUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -586,17 +586,7 @@ BOOL RCTRunningInAppExtension(void)
UIScene *sceneToUse = foregroundActiveScene ? foregroundActiveScene : foregroundInactiveScene;
UIWindowScene *windowScene = (UIWindowScene *)sceneToUse;

if (@available(iOS 15.0, *)) {
return windowScene.keyWindow;
}

for (UIWindow *window in windowScene.windows) {
if (window.isKeyWindow) {
return window;
}
}

return nil;
return windowScene.keyWindow;
}

UIStatusBarManager *__nullable RCTUIStatusBarManager(void)
Expand Down

0 comments on commit e98c221

Please sign in to comment.