Repository navigation
fix(mobile): iOS builds on Xcode 27.0 no longer fail on 27.1-only hinge APIs - #18913
Open
JeremiahDJordan wants to merge 1 commit into
Open
JeremiahDJordan wants to merge 1 commit into
JeremiahDJordan wants to merge 1 commit into
Conversation
…ge APIs T3LayoutMetricsView gated the iOS 27.1 hinge, vertical-bar-edge and reserved-region APIs on `#if compiler(>=6.4)`. Xcode 27.0 ships Swift 6.4 with only the iOS 27.0 SDK, so the check passed and device and simulator builds failed with "cannot find 'UIHingeInteraction' in scope". Gate on the SDK instead: `canImport(UIKit, _version: 9127.0.85)` is true only for the UIKit that ships in the iOS 27.1 SDK. The `#available(iOS 27.1, *)` runtime checks are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a minimal one-file build compatibility fix that gates iOS 27.1 APIs on SDK availability rather than Swift compiler version. Existing supported builds retain their behavior, while Xcode 27.0 builds avoid compiling unavailable APIs. Notes:
You can add or adjust custom eligibility rules. Learn more. |
macroscopeapp
Bot
dismissed
their stale review
October 13, 2026 04:04
Dismissing prior approval to re-evaluate 704ddeb
This branch has not been deployed
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.
Problem
On Xcode 27.0 (27A266a), iOS device and simulator builds of the mobile app fail in
T3LayoutMetricsView.swift:These iOS 27.1 APIs are gated on
#if compiler(>=6.4), added in #12648 and extended in #18654. Xcode 27.0 already ships Swift 6.4 but only the iOS 27.0 SDK, which doesn't declare them. So the compiler check passes, but the SDK doesn't have the APIs.Change
Both blocks now check the SDK instead of the compiler:
#if canImport(UIKit, _version: 9127.0.85). The UIKit Swift module's-user-module-versionis9127.0.84.1.116in the iOS 27.0 SDK and9127.0.85.32.903in the iOS 27.1 SDK (Xcode 27.1 RC). TheUIKit.tbdcurrent-versionshows the same bump, from 9127.0.84 to 9127.0.85. The hinge headers (UIHingeInteraction.h,UIVerticalBarEdge.h) exist only in the 27.1 SDK. The#available(iOS 27.1, *)runtime checks are unchanged. When built with Xcode 27.1, the app compiles and behaves exactly as before. When built with Xcode 27.0, these blocks are compiled out, which is what happened on Xcode 26 and earlier.Scope and approval
This is a small, focused fix for an obvious build break. It's one file and two preprocessor conditions, with no change to product behavior. Anyone building the iOS app with Xcode 27.0 hits it, so I didn't open an issue first.
Verification
On macOS 27 with Xcode 27.0 (27A266a, Swift 6.4, iOS SDK 27.0) and Xcode 27.1 RC (iOS SDK 27.1), I typechecked the real
T3LayoutMetricsView.swiftwithswiftc -typecheckforarm64-apple-ios18.0(-simulator). I used small stubs for the Expo types (ExpoView,EventDispatcher,AppContext) andT3WorkspaceOrientationSubscriber, and a probe file that prints which branch each condition takes:compiler(>=6.4)canImport(UIKit, _version: 9127.0.85)What I couldn't check:
expo prebuild+xcodebuildof the app. The build machine was short on disk space.#iflines, and CI's native lint covers it.Model and harness: Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code