From 6963d612b5eb46b051a3e53340ac5170bc283b1b Mon Sep 17 00:00:00 2001 From: Tom Brow Date: Mon, 12 Oct 2026 12:46:02 -0700 Subject: [PATCH] fix: adapt Flutter architecture verification for Xcode 27 Signed-off-by: Tom Brow --- .github/workflows/_ci-clients.yml | 2 ++ CONTRIBUTING.md | 5 +++++ Justfile | 1 + scripts/apple-tools/lipo | 13 +++++++++++++ 4 files changed, 21 insertions(+) create mode 100755 scripts/apple-tools/lipo diff --git a/.github/workflows/_ci-clients.yml b/.github/workflows/_ci-clients.yml index a8f2882f04..54dbd2e84f 100644 --- a/.github/workflows/_ci-clients.yml +++ b/.github/workflows/_ci-clients.yml @@ -150,6 +150,8 @@ jobs: run: /bin/bash scripts/test-mobile-pagination.sh - name: Trust pinned Swift source-copy plugin run: python3 scripts/trust-ios-package-plugin.py --trust-file "$HOME/Library/org.swift.swiftpm/security/plugins.json" + - name: Use Xcode 27 lipo compatibility adapter for Flutter + run: echo "$GITHUB_WORKSPACE/scripts/apple-tools" >> "$GITHUB_PATH" - name: Build complete iOS simulator app run: cd mobile && flutter build ios --simulator --debug --no-pub --verbose - name: Test native pagination accessibility diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1126c7e863..c2e2a9799d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -622,3 +622,8 @@ The iOS Swift dependency uses `SharedSourcesPlugin` to copy its shared Swift sou Xcode users must approve this plugin when prompted. CI trusts only its reviewed commit fingerprint using `scripts/trust-ios-package-plugin.py`; package upgrades require reviewing the plugin before updating that fingerprint. + +Flutter 3.41 requires the repository’s `scripts/apple-tools` directory first on +`PATH` for manual iOS builds with Xcode 27. Its `lipo` adapter verifies each +architecture separately because Xcode 27 rejects Flutter’s combined verification +command. `just mobile-dev` and CI configure this automatically. diff --git a/Justfile b/Justfile index 2fb44361ce..cc25f471d7 100644 --- a/Justfile +++ b/Justfile @@ -1027,6 +1027,7 @@ mobile-build-android: mobile-dev: #!/usr/bin/env bash set -euo pipefail + export PATH="{{justfile_directory()}}/scripts/apple-tools:$PATH" ./scripts/check-xcode.sh if ! pgrep -x Simulator &>/dev/null; then open -a Simulator diff --git a/scripts/apple-tools/lipo b/scripts/apple-tools/lipo new file mode 100755 index 0000000000..765df60cc4 --- /dev/null +++ b/scripts/apple-tools/lipo @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# Flutter 3.41 passes multiple architectures to -verify_arch. Xcode 27's +# lipo accepts only one at a time. Preserve the all-architectures requirement. +set -euo pipefail +if [[ $# -ge 3 && "$2" == -verify_arch ]]; then + binary="$1" + shift 2 + for architecture in "$@"; do + xcrun lipo "$binary" -verify_arch "$architecture" + done +else + exec xcrun lipo "$@" +fi