Skip to content

Commit

Permalink
Fix: currentWindowInScene may unexpectedly return null
Browse files Browse the repository at this point in the history
This is caused by AirPlay bug fix (bc8d5a9)
  • Loading branch information
khanhduytran0 committed Aug 3, 2024
1 parent aafdeaf commit e021b7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Natives/UIKit+hook.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ - (BOOL)forceFullHeightInLandscape {
@end

UIWindow* currentWindowInScene(BOOL external) {
id delegate;
id delegate = UIApplication.sharedApplication.delegate;
for (UIScene *scene in UIApplication.sharedApplication.connectedScenes.allObjects) {
if (external != (scene.session.role == UIWindowSceneSessionRoleApplication)) {
delegate = scene.delegate;
Expand Down

0 comments on commit e021b7d

Please sign in to comment.