fix(iOS): migrate from RCTSharedApplication() for RCTDeviceInfo's RCTIsIPhoneNotched method#47220
Closed
TheRogue76 wants to merge 2 commits into
Closed
fix(iOS): migrate from RCTSharedApplication() for RCTDeviceInfo's RCTIsIPhoneNotched method#47220TheRogue76 wants to merge 2 commits into
TheRogue76 wants to merge 2 commits into
Conversation
…IsIPhoneNotched method
cipolleschi
approved these changes
Oct 28, 2024
Contributor
cipolleschi
left a comment
There was a problem hiding this comment.
thanks for this small refactor!
Contributor
|
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
|
@cipolleschi merged this pull request in c1e964a. |
Collaborator
|
This pull request was successfully merged by @TheRogue76 in c1e964a When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Far as i can see it, this is the last direct reference to how we used to get windows before the introduction of scenes. Everything now uses the new Scenes system (potentially we could start adding a
RCTSceneDelegateif we ever want to move in that direction)I also threw in a nullability check. Theoretically, that shouldn't happen, but honestly, who knows what platform will come in the future, better safe than sorry. Let me know if you think i should remove it
Changelog:
[INTERNAL] [FIXED] - Potentially Migrate the last
KeyWindowusage toRCTKeyWindowinstead of tapping to theUIWindowdirectly via RCTSharedApplicationTest Plan:
yarn test:


iOS test: Sadly it seems like it is still broken on Xcode 16 on my machine. Will leave it up to the CI to test it. I can see that there are more that are potentially broken. Might try to take a look and see if i can fix it in another PR.