Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 3c1143f

Browse files
author
Chris Yang
authored
Ignore unguarded-availability for unit test (#44852)
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
1 parent a627d46 commit 3c1143f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

shell/platform/darwin/ios/BUILD.gn

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ source_set("ios_test_flutter_mrc") {
227227
"-F$platform_frameworks_path",
228228
"-mios-simulator-version-min=$ios_testing_deployment_target",
229229
]
230+
231+
# XCode 15 beta has a bug where iOS 17 API usage is not guarded.
232+
# This bug results engine build failure since the engine treats warnings as errors.
233+
# The `-Wno-unguarded-availability-new` can be removed when the XCode bug is fixed.
234+
# See details in https://github.com/flutter/flutter/issues/128958.
235+
cflags_objcc = [ "-Wno-unguarded-availability-new" ]
230236
sources = [
231237
"framework/Source/FlutterEnginePlatformViewTest.mm",
232238
"framework/Source/FlutterEngineTest_mrc.mm",
@@ -271,6 +277,12 @@ shared_library("ios_test_flutter") {
271277
"-fobjc-arc",
272278
"-mios-simulator-version-min=$ios_testing_deployment_target",
273279
]
280+
281+
# XCode 15 beta has a bug where iOS 17 API usage is not guarded.
282+
# This bug results engine build failure since the engine treats warnings as errors.
283+
# The `-Wno-unguarded-availability-new` can be removed when the XCode bug is fixed.
284+
# See details in https://github.com/flutter/flutter/issues/128958.
285+
cflags_objcc = [ "-Wno-unguarded-availability-new" ]
274286
ldflags = [
275287
"-F$platform_frameworks_path",
276288
"-Wl,-install_name,@rpath/Frameworks/libios_test_flutter.dylib",

0 commit comments

Comments
 (0)