diff --git a/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn b/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn index b6b1799365..8aa967ae6c 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn +++ b/engine/src/flutter/shell/platform/darwin/ios/BUILD.gn @@ -227,6 +227,12 @@ source_set("ios_test_flutter_mrc") { "-F$platform_frameworks_path", "-mios-simulator-version-min=$ios_testing_deployment_target", ] + + # XCode 15 beta has a bug where iOS 17 API usage is not guarded. + # This bug results engine build failure since the engine treats warnings as errors. + # The `-Wno-unguarded-availability-new` can be removed when the XCode bug is fixed. + # See details in https://github.com/flutter/flutter/issues/128958. + cflags_objcc = [ "-Wno-unguarded-availability-new" ] sources = [ "framework/Source/FlutterEnginePlatformViewTest.mm", "framework/Source/FlutterEngineTest_mrc.mm", @@ -271,6 +277,12 @@ shared_library("ios_test_flutter") { "-fobjc-arc", "-mios-simulator-version-min=$ios_testing_deployment_target", ] + + # XCode 15 beta has a bug where iOS 17 API usage is not guarded. + # This bug results engine build failure since the engine treats warnings as errors. + # The `-Wno-unguarded-availability-new` can be removed when the XCode bug is fixed. + # See details in https://github.com/flutter/flutter/issues/128958. + cflags_objcc = [ "-Wno-unguarded-availability-new" ] ldflags = [ "-F$platform_frameworks_path", "-Wl,-install_name,@rpath/Frameworks/libios_test_flutter.dylib",