fix(ui): Skip EDR Metal path on iOS Simulator - #118
Merged
Conversation
MTLCreateSystemDefaultDevice() returns a valid device on Apple Silicon iOS Simulator hosts, so EDRMetalView.isSupported returned true and LinkDetailRenderView rendered the QR code through an MTKView. In the simulator, Metal-backed views don't capture reliably via XCUIScreenshot and the wrapping VStack stops exposing as an accessibility image, which broke ScreenshotUITests.testScreenshots at the "link-detail.qr-code.container" lookup. Always return false on simulator so the SwiftUI Image(uiImage:) fallback is used. This has been silently broken on main since #116 landed because the build-test.yml Screenshots job (generate_screenshots_ci / capture_screenshots on a single device) doesn't fail the lane on test failure.
philprime
enabled auto-merge (squash)
April 21, 2026 16:46
📲 Install BuildsiOS
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EDRMetalView.isSupportedcheckedMTLCreateSystemDefaultDevice() != nil, which returns true on Apple Silicon iOS Simulator hosts. As a result,LinkDetailRenderViewrendered the QR code through anMTKViewon the simulator, which broke two things:ScreenshotUITests.swift:97—app.images["link-detail.qr-code.container"]can't find the container because the wrappingVStackno longer exposes as an accessibility image element when its child is anMTKView.MTKViewdoesn't render reliably intoXCUIScreenshotPNGs, so the QR screen screenshot would be blank/incorrect even if the assertion weren't looking for.images.Introduced by #116 (EDR bright display for QR codes).
isSupportednow returnsfalseunder#if targetEnvironment(simulator), falling back to the SwiftUIImage(uiImage:)path. Real devices still get EDR Metal rendering.This has been silently broken on main since #116 landed: the PR-level
Screenshotsjob runsgenerate_screenshots_ci→fastlane capture_screenshots, which reports test failures in its own results table (❌) but still exits 0 and prints✅ generated successfully. The failure surfaced now because the new parallel screenshot pipeline on #113 usesrun_testswithfail_build: true.generate_screenshots_cishould be hardened to propagate test failures — tracking separately.Unblocks #113.