fix: adapt Flutter architecture verification for Xcode 27

Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
Tom Brow
2026-10-12 12:46:02 -07:00
parent 693fc6bd8a
commit 6963d612b5
4 changed files with 21 additions and 0 deletions

View File

@@ -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

View File

@@ -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.

View File

@@ -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

13
scripts/apple-tools/lipo Executable file
View File

@@ -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