Skip to content

Fix the iOS build on Xcode 27.0 (pager fold split from #217) - #222

Merged
simonhamp merged 1 commit into
mainfrom
fix/xcode27-reserved-regions
Nov 19, 2026
Merged

simonhamp merged 1 commit into
mainfrom
fix/xcode27-reserved-regions

Conversation

@simonhamp

@simonhamp simonhamp commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

mobile-air's "iOS Build - Xcode 27.0" check has failed on main and on every PR since #217 landed. The build stops in NativeUIPagerRenderer.swift:

1037:27: error: value of type 'GeometryProxy' has no member 'reservedRegions'
1039:26: error: the compiler is unable to type-check this expression in reasonable time

GeometryProxy.reservedRegions is new in the iOS 27.1 SDK. The #available(iOS 27.1, *) guard only works at run time, so Xcode 27.0 still can't compile the call. The second error is a knock-on from the first.

This puts the fold lookup behind #if canImport(SwiftUICore, _version: 8.0.85). A #if compiler(...) check won't work here because Xcode 27.0 and 27.1 both ship Swift 6.4. The SDK's SwiftUICore version does differ: the iOS 27.0 simulator runtime has 8.0.84, 27.1 has 8.0.85, and the 27.2 SDK has 8.1.13. Built with Xcode 27.0, the pager splits evenly, the same as on any phone without a fold. Built with 27.1 or later, nothing changes.

I also moved the lookup into a small helper with explicit types and turned the ternary into an if/else, so it can't run into the type-checker limit again.

The cut-off is confirmed on the real SDKs. A throwaway mobile-air PR (NativePHP/mobile-air#725) ran its iOS Build against this branch on both Xcodes and printed each SDK's SwiftUICore version:

  • Xcode 27.0 (27A266a): SwiftUICore 8.0.84.1.104, so the fold lookup is left out. Debug and Release builds succeeded.
  • Xcode 27.1 (27A9275): SwiftUICore 8.0.85.29, so the fold lookup is compiled in. Debug and Release builds succeeded.

mobile-air's own iOS Build checks out mobile-ui main, so it goes green once this is merged.

Also tested locally with Xcode 27.2 (Swift 6.4.2): a swiftc -typecheck -wmo of mobile-air main's app Swift plus this repo's resources/ios shows the same baseline errors as main and none in the pager. I planted a canary error inside the gated block. It fired with the gate as written and didn't fire with the gate forced off, which stands in for the 27.0 SDK.

I also ran mobile-air's iOS Build steps locally on Xcode 27.2 against this branch and mobile-air main: native:install ios, native:build --simulated, then the Release device build with xcodebuild. Both builds succeeded.

🤖 Generated with Claude Code

#217 calls GeometryProxy.reservedRegions, which only exists in the
iOS 27.1 SDK. #available is a run time check, so Xcode 27.0 still
fails to compile the call, and the ternary after it then fails to
type-check. That broke mobile-air's iOS Build on Xcode 27.0.

The call now sits behind canImport(SwiftUICore, _version: 8.0.85).
Xcode 27.0 and 27.1 both ship Swift 6.4, so a compiler check can't
tell them apart, but SwiftUICore is 8.0.84 in iOS 27.0 and 8.0.85 in
27.1. On 27.0 the pager splits evenly, as it does on any phone without
a fold. The fold lookup moves into a helper with explicit types and the
ternary becomes an if/else.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonhamp
simonhamp merged commit 3a6096d into main Nov 19, 2026
4 checks passed
@simonhamp
simonhamp deleted the fix/xcode27-reserved-regions branch November 19, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant