ci(e2e-pay): fix iOS build — mobile_scanner has no x86_64 simulator slice#399
Conversation
… error PR #398 (QR scanner → mobile_scanner) broke the iOS E2E Pay lane. The build uses `-destination "generic/platform=iOS Simulator"`, which builds both arm64 and x86_64 simulator slices. mobile_scanner pulls in Google MLKitBarcodeScanning, which ships no x86_64 simulator slice, so the x86_64 compile fails with `Module 'mobile_scanner' not found` and BUILD FAILED. Pin the simulator build to arm64 (via destination arch + EXCLUDED_ARCHS). The runner is Apple Silicon, so arm64 is the only slice the emulator lane needs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @ignaciosantise's task in 1m 50s —— View job Review Complete
✅ No issues found The fix is correct and well-reasoned:
|
There was a problem hiding this comment.
Pull request overview
This PR fixes the iOS E2E Pay CI build break introduced after migrating the QR scanner to mobile_scanner, by ensuring the simulator build targets only the arm64 slice (since MLKit’s barcode scanning pod does not include an x86_64 simulator slice).
Changes:
- Pin
xcodebuildsimulator destination toarch=arm64. - Exclude
x86_64foriphonesimulatorbuilds to avoid generating an unsupported fat simulator binary.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| -destination "generic/platform=iOS Simulator,arch=arm64" \ | ||
| -derivedDataPath ../build/ios-ddcache \ | ||
| EXCLUDED_ARCHS[sdk=iphonesimulator*]=x86_64 \ | ||
| CODE_SIGNING_ALLOWED=YES \ |
`arch=arm64` is not a valid key on a *generic* iOS Simulator destination, so xcodebuild errored with "Unable to find a destination matching the provided destination specifier". Revert to the plain generic destination and rely on `EXCLUDED_ARCHS[sdk=iphonesimulator*]=x86_64` to drop the unsupported x86_64 slice (MLKitBarcodeScanning via mobile_scanner ships no x86_64 sim slice). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…4-sim slice) Verified locally: mobile_scanner pulls in GoogleMLKit, whose .frameworks are fat binaries carrying an arm64-*device* slice and an x86_64-*simulator* slice but NO arm64-simulator slice. On the Apple Silicon runner the default arm64 simulator build fails to link MLKit: ld: building for 'iOS-simulator', but linking in object file (MLImage.framework/MLImage[arm64](GMLImage.o)) built for 'iOS' x86_64 is the only working simulator slice (runs via Rosetta 2). EXCLUDED_ARCHS =arm64 alone doesn't help because arm64 is the standard sim arch here, so pin ARCHS=x86_64 with ONLY_ACTIVE_ARCH=NO. Confirmed `** BUILD SUCCEEDED **` and a non-fat x86_64 Runner.app locally with Xcode 26.2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @ignaciosantise's task in 1m 43s —— View job Incremental Review
🔄 Incremental Review: Checking Copilot's shell-globbing flag from the first review round. Copilot finding — The current fix (
✅ No new issues found in latest commits |
Problem
The iOS E2E Pay lane (
pay-tests-ios) has been failing since #398 (QR scanner →mobile_scanner) merged. It fails at the Build Runner.app step:(failing run)
Root cause
The build uses
-destination "generic/platform=iOS Simulator"with no arch pin, soxcodebuildbuilds both arm64 and x86_64 simulator slices.mobile_scannerpulls in Google MLKitBarcodeScanning, which ships no x86_64 simulator slice (Apple-Silicon simulator only). The x86_64 compile ofGeneratedPluginRegistrant.othen can't find themobile_scannermodule →BUILD FAILED.Android was unaffected; only the iOS lane broke.
Fix
Pin the simulator build to arm64 (via
-destination ...,arch=arm64+EXCLUDED_ARCHS[sdk=iphonesimulator*]=x86_64). The CI runner (macos-latest-xlarge) is Apple Silicon, so arm64 is the only slice the emulator lane needs.🤖 Generated with Claude Code