Skip to content

Replace deprecated UIScreen.mainScreen in FLEXMacros.h#739

Merged
NSExceptional merged 5 commits into
FLEXTool:masterfrom
matrush:master
May 30, 2026
Merged

Replace deprecated UIScreen.mainScreen in FLEXMacros.h#739
NSExceptional merged 5 commits into
FLEXTool:masterfrom
matrush:master

Conversation

@matrush
Copy link
Copy Markdown
Collaborator

@matrush matrush commented Apr 27, 2026

Adds a FLEXScreen() helper that resolves a UIScreen instance through the application's connected scene context, preferring the foreground-active window scene. UIScreen.mainScreen is deprecated in iOS 26.

Screenshot 2026-04-27 at 3 23 58 PM

claude and others added 2 commits April 27, 2026 22:15
Adds a FLEXScreen() helper that resolves a UIScreen instance through the
application's connected scene context, preferring the foreground-active
window scene. UIScreen.mainScreen is deprecated in iOS 26.
…rM9M

Replace deprecated UIScreen.mainScreen in FLEXMacros.h
Copy link
Copy Markdown
Member

@ryanolsonk ryanolsonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit to add braces, otherwise lgtm. Thanks for doing this!

Comment thread Classes/Utility/FLEXMacros.h Outdated
Comment thread Classes/Utility/FLEXMacros.h Outdated
@matrush matrush requested a review from ryanolsonk May 18, 2026 17:35
Copy link
Copy Markdown
Collaborator

@NSExceptional NSExceptional left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread Classes/Utility/FLEXMacros.h Outdated
claude and others added 2 commits May 30, 2026 01:32
connectedScenes, UIWindowScene and UISceneActivationState are iOS 13+
APIs but FLEX deploys to iOS 9. Calling -connectedScenes on iOS < 13
crashes with an unrecognized selector. Fall back to +[UIScreen mainScreen]
on older versions, where it is not yet deprecated.
…rM9M

Guard FLEXScreen() scene APIs behind @available(iOS 13.0)
@matrush matrush requested a review from NSExceptional May 30, 2026 03:09
Copy link
Copy Markdown
Collaborator

@NSExceptional NSExceptional left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :)

@NSExceptional NSExceptional merged commit d2ebc25 into FLEXTool:master May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants