diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 531e8347116e7..18d1893968950 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -803,10 +803,18 @@ - (BOOL)isAlwaysUse24HourFormat { constexpr CGFloat kStandardStatusBarHeight = 20.0; - (void)handleStatusBarTouches:(UIEvent*)event { + CGFloat standardStatusBarHeight = kStandardStatusBarHeight; + if (_platformSupportsSafeAreaInsets) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + standardStatusBarHeight = self.view.safeAreaInsets.top; +#pragma clang diagnostic pop + } + // If the status bar is double-height, don't handle status bar taps. iOS // should open the app associated with the status bar. CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame; - if (statusBarFrame.size.height != kStandardStatusBarHeight) { + if (statusBarFrame.size.height != standardStatusBarHeight) { return; }