flutter/packages/flutter_tools/lib/src
Victoria Ashworth 529a4d2bac
Disable sandboxing for macOS apps and tests in CI (#149618)
macOS 14 added new requirements that un-codesigned sandbox apps must be granted access when changed. Waiting for this UI caused macOS tests to fail on macOS 14 because the test runner forced codesigning off. Additionally, adding codesigning is not sufficient, since it must still be approved before codesigning is enough to pass the check. As a workaround, this PR disables sandboxing for macOS apps/tests in CI.

![Screenshot 2024-05-30 at 2 41 33 PM](https://github.com/flutter/flutter/assets/682784/1bc32620-5edb-420a-866c-5cc529b2ac55)

https://developer.apple.com/documentation/updates/security#June-2023)
> App Sandbox now associates your macOS app with its sandbox container using its code signature. The operating system asks the person using your app to grant permission if it tries to access a sandbox container associated with a different app. For more information, see [Accessing files from the macOS App Sandbox](https://developer.apple.com/documentation/security/app_sandbox/accessing_files_from_the_macos_app_sandbox).

And that link explains why this is happening on a macOS 14 update:

> In macOS 14 and later, the operating system uses your app’s code signature to associate it with its sandbox container. If your app tries to access the sandbox container owned by another app, the system asks the person using your app whether to grant access. If the person denies access and your app is already running, then it can’t read or write the files in the other app’s sandbox container. If the person denies access while your app is launching and trying to enter the other app’s sandbox container, your app fails to launch.
> 
> The operating system also tracks the association between an app’s code signing identity and its sandbox container for helper tools, including launch agents. If a person denies permission for a launch agent to enter its sandbox container and the app fails to start, launchd starts the launch agent again and the operating system re-requests access.

Fixes https://github.com/flutter/flutter/issues/149268.
Fixes framework part of https://github.com/flutter/flutter/issues/149264.
Might fix packages issue: https://github.com/flutter/flutter/issues/149329.

Verified framework tests:
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20plugin_test_macos/9/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20run_debug_test_macos/2/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20tool_integration_tests_4_4/2/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20integration_ui_test_test_macos/3/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac%20flavors_test_macos/3/overview
https://ci.chromium.org/ui/p/flutter/builders/staging.shadow/Mac_benchmark%20complex_layout_scroll_perf_macos__timeline_summary/6/overview
2024-06-04 21:51:19 +00:00
..
android Add a migrator to remove FlutterMultiDexApplication.java (#148515) 2024-05-21 18:53:53 +00:00
base [tool] Use kebabCase directly (#149150) 2024-05-28 15:33:15 +00:00
build_system [web] Remove --dart-sdk flag to dart2wasm compiler (#149129) 2024-05-28 09:48:44 +02:00
commands Disable sandboxing for macOS apps and tests in CI (#149618) 2024-06-04 21:51:19 +00:00
custom_devices Control flow collections: flutter_tools/ (#147450) 2024-05-02 22:19:18 +00:00
dart Reland: Update link branches to main (#146882) 2024-04-17 13:16:33 +00:00
debug_adapters Unpin DDS and roll pub packages (#147925) 2024-05-08 10:35:28 +01:00
drive [tool] Use kebabCase directly (#149150) 2024-05-28 15:33:15 +00:00
fuchsia Control flow collections: flutter_tools/ (#147450) 2024-05-02 22:19:18 +00:00
intellij Remove duplicate global declaration of UserMessages (#142281) 2024-01-26 21:41:16 +00:00
ios Reland "if chains → switch expressions" (#148634) 2024-05-20 17:43:00 +00:00
isolated [iOS] fix hot restart with native assets (#148752) 2024-05-23 18:30:55 +02:00
linux Disable sandboxing for macOS apps and tests in CI (#149618) 2024-06-04 21:51:19 +00:00
localizations update generated localized message files in the stocks test app (#148741) 2024-06-03 18:08:19 +00:00
macos Disable sandboxing for macOS apps and tests in CI (#149618) 2024-06-04 21:51:19 +00:00
migrations Fixed few typos (#147087) 2024-04-22 16:49:19 +00:00
proxied_devices Avoid forwarding the data after socket is disconnected. (#146665) 2024-04-12 21:45:32 +00:00
reporting Swap crash reporting with unified analytics (#148525) 2024-05-18 01:30:13 +00:00
runner Disable sandboxing for macOS apps and tests in CI (#149618) 2024-06-04 21:51:19 +00:00
test [web] Remove --dart-sdk flag to dart2wasm compiler (#149129) 2024-05-28 09:48:44 +02:00
tester in flutter run, throw tool exit when --flavor is provided but is not supported on the target device (#139045) 2024-01-05 21:47:58 +00:00
vscode Remove duplicate global declaration of UserMessages (#142281) 2024-01-26 21:41:16 +00:00
web [tool] Use kebabCase directly (#149150) 2024-05-28 15:33:15 +00:00
windows Disable sandboxing for macOS apps and tests in CI (#149618) 2024-06-04 21:51:19 +00:00
application_package.dart Remove unnecessary null checks in flutter_tool (#118857) 2023-01-23 21:43:08 +00:00
artifacts.dart [tool] Use kebabCase directly (#149150) 2024-05-28 15:33:15 +00:00
asset.dart Add none language strings to code blocks. (#146154) 2024-04-02 16:42:25 -07:00
build_info.dart Implementing switch expressions in flutter_tools/ (#145632) 2024-03-29 22:31:19 +00:00
bundle_builder.dart print traces when transforming an asset (#146374) 2024-04-22 16:37:24 +00:00
bundle.dart Remove the fast reassemble / single widget reload feature (#132255) 2023-08-10 21:48:06 +00:00
cache.dart Reland "Add FlutterMacOS.xcframework artifact (#143244)" (#144275) 2024-02-28 20:09:54 +00:00
cmake_project.dart [Windows] Ensure window is shown (#127046) 2023-05-19 22:25:55 +00:00
cmake.dart Reduce usage of testUsingContext (#131078) 2023-07-24 17:22:25 +00:00
compile.dart [native_assets] Use kernel concatenation (#147158) 2024-04-25 11:22:17 +00:00
context_runner.dart Add a --print-dtd flag to print the DTD address served by DevTools server (#144272) 2024-03-25 13:04:18 -07:00
convert.dart Make custom Utf8Decoder replacement not extend platform class. (#123211) 2023-03-22 07:53:56 -07:00
daemon.dart Turning if chains into shorter switch statements (#144977) 2024-03-13 17:16:17 +00:00
dart_pub_json_formatter.dart Pub dependencies project validator (#106895) 2022-07-15 23:12:05 +00:00
desktop_device.dart Disable sandboxing for macOS apps and tests in CI (#149618) 2024-06-04 21:51:19 +00:00
devfs.dart add verbose logging to select hot reload/hot restart tests (#147673) 2024-05-02 04:03:32 +00:00
device_port_forwarder.dart
device_vm_service_discovery_for_attach.dart Support mdns when attaching to proxied devices. (#146021) 2024-04-09 20:00:21 +00:00
device.dart Reland "if chains → switch expressions" (#148634) 2024-05-20 17:43:00 +00:00
devtools_launcher.dart Add a --print-dtd flag to print the DTD address served by DevTools server (#144272) 2024-03-25 13:04:18 -07:00
doctor_validator.dart Implementing switch expressions in flutter_tools/ (#145632) 2024-03-29 22:31:19 +00:00
doctor.dart Control flow collections: flutter_tools/ (#147450) 2024-05-02 22:19:18 +00:00
emulator.dart [tools] Add column header for emulators information (#142853) 2024-02-14 12:49:24 +00:00
features.dart Add Swift Package Manager as new opt-in feature for iOS and macOS (#146256) 2024-04-18 21:12:36 +00:00
flutter_application_package.dart Enable native compilation for windows-arm64 (#141930) 2024-01-26 00:08:20 +00:00
flutter_cache.dart Place flutter_gpu in the package cache. (#149299) 2024-06-03 22:46:02 +00:00
flutter_device_manager.dart Flutter preview device (#135639) 2023-10-18 00:27:54 +00:00
flutter_features.dart Add Swift Package Manager as new opt-in feature for iOS and macOS (#146256) 2024-04-18 21:12:36 +00:00
flutter_manifest.dart add default-flavor field to flutter pubspec, which will be used as the flavor in flutter build/run if --flavor is not provided (#147968) 2024-05-22 05:11:24 +00:00
flutter_plugins.dart feat: Rework getting plugin implementation candidates and plugin resolution (#145258) 2024-05-07 20:03:27 +00:00
flutter_project_metadata.dart switch statement cleanup (#148382) 2024-05-16 17:16:06 -07:00
globals.dart Disable single character mode in the terminal when exiting flutter_tools (#146534) 2024-04-10 23:54:42 +00:00
http_host_validator.dart Fix typos (#121171) 2023-02-23 19:43:21 +00:00
license_collector.dart [flutter_tools] refactor license collector (#128748) 2023-06-15 20:25:19 +00:00
mdns_discovery.dart Enable native compilation for windows-arm64 (#141930) 2024-01-26 00:08:20 +00:00
native_assets.dart Reland "Move native assets to isolated/ directory" (#143055) 2024-02-08 17:49:48 +00:00
persistent_tool_state.dart Add missing parameter to TableBorder.symmetric, and improve class constructors (#144279) 2024-03-04 20:20:19 +00:00
platform_plugins.dart Add missing parameter to TableBorder.symmetric, and improve class constructors (#144279) 2024-03-04 20:20:19 +00:00
plugins.dart Control flow collections: flutter_tools/ (#147450) 2024-05-02 22:19:18 +00:00
pre_run_validator.dart Add missing parameter to TableBorder.symmetric, and improve class constructors (#144279) 2024-03-04 20:20:19 +00:00
preview_device.dart [flutter_tools] Ensure flutter daemon clients can detect preview device (#140112) 2023-12-21 19:01:16 +00:00
project_validator_result.dart Add info project validator status (#109169) 2022-08-09 17:59:06 +00:00
project_validator.dart Control flow collections: flutter_tools/ (#147450) 2024-05-02 22:19:18 +00:00
project.dart Control flow collections: flutter_tools/ (#147450) 2024-05-02 22:19:18 +00:00
protocol_discovery.dart Remove an unnecessary assert (#129796) 2023-06-30 18:07:54 +00:00
proxy_validator.dart Control flow collections: flutter_tools/ (#147450) 2024-05-02 22:19:18 +00:00
resident_devtools_handler.dart Add a --print-dtd flag to print the DTD address served by DevTools server (#144272) 2024-03-25 13:04:18 -07:00
resident_runner.dart Reland "if chains → switch expressions" (#148634) 2024-05-20 17:43:00 +00:00
run_cold.dart Update Android minSdkVersion to 21 (#142267) 2024-01-29 09:49:09 -08:00
run_hot.dart add print traces to reload isolate resume logic (#147997) 2024-05-08 19:57:57 +00:00
sksl_writer.dart Enable native compilation for windows-arm64 (#141930) 2024-01-26 00:08:20 +00:00
template.dart Fix description in index.html / manifest.json getting double quoted (#131842) 2023-08-18 02:58:20 +00:00
tracing.dart Reland "Remove references to Observatory (#118577)" (#121606) 2023-02-28 11:57:04 -05:00
update_packages_pins.dart Don't pin package:macros (#148087) 2024-05-09 16:28:49 -07:00
version.dart Implementing switch expressions in flutter_tools/ (#145632) 2024-03-29 22:31:19 +00:00
vmservice.dart log incoming vm service messages in FlutterVMService::runInView (#148596) 2024-05-20 18:55:24 +00:00
web_template.dart Flutter Web Bootstrapping Improvements (#144434) 2024-03-12 22:41:26 +00:00
xcode_project.dart Control flow collections: flutter_tools/ (#147450) 2024-05-02 22:19:18 +00:00