Skip to content

Commit 37f6080

Browse files
talka123456ClownFish
authored andcommitted
Fix iOS 16 _statusBarWindow crash (FLEXTool#607)
Co-authored-by: ClownFish <[email protected]>
1 parent 7119c2f commit 37f6080

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Classes/ExplorerInterface/FLEXExplorerViewController.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,12 @@ - (void)hierarchyButtonTapped:(FLEXExplorerToolbarItem *)sender {
403403
}
404404

405405
- (UIWindow *)statusWindow {
406-
NSString *statusBarString = [NSString stringWithFormat:@"%@arWindow", @"_statusB"];
407-
return [UIApplication.sharedApplication valueForKey:statusBarString];
406+
if (!@available(iOS 16, *)) {
407+
NSString *statusBarString = [NSString stringWithFormat:@"%@arWindow", @"_statusB"];
408+
return [UIApplication.sharedApplication valueForKey:statusBarString];
409+
}
410+
411+
return nil;
408412
}
409413

410414
- (void)recentButtonTapped:(FLEXExplorerToolbarItem *)sender {

0 commit comments

Comments
 (0)