Skip to content

Commit

Permalink
Ignore unguarded-availability for unit test (flutter#44852)
Browse files Browse the repository at this point in the history
Ignore ungarded-availability for unit test

fixes flutter/flutter#128958

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
  • Loading branch information
Chris Yang authored Aug 25, 2023
1 parent a627d46 commit 3c1143f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions shell/platform/darwin/ios/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 3c1143f

Please sign in to comment.