Skip to content

Guard iOS 26 APIs for compatibility with Xcode 16.x#506

Open
kastwey wants to merge 1 commit intocallstack:mainfrom
kastwey:fix/ios26-compiler-guard
Open

Guard iOS 26 APIs for compatibility with Xcode 16.x#506
kastwey wants to merge 1 commit intocallstack:mainfrom
kastwey:fix/ios26-compiler-guard

Conversation

@kastwey
Copy link

@kastwey kastwey commented Mar 8, 2026

Problem

Builds fail on Xcode 16.x (Swift 5.10) because TabViewBottomAccessoryPlacement, .tabViewBottomAccessory, and \.tabViewBottomAccessoryPlacement are iOS 26 APIs that the compiler cannot resolve — even inside @available(iOS 26.0, *) blocks. The @available attribute is a runtime check; the compiler still needs to parse and type-check the code at compile time.
PR #486 partially addressed this for macOS with #if !os(macOS), but the same issue affects iOS when using any Xcode version prior to Xcode 26.

Solution

Replace #if !os(macOS) with #if compiler(>=6.1) && !os(macOS) in both BottomAccessoryProvider.swift and NewTabView.swift. Swift 6.1 ships with Xcode 26, so this ensures the iOS 26 API references are only compiled when the toolchain actually supports them.

Changes

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.

[IOS] Swift Compilation Error in NewTabView.swift - Generic Parameter Inference Failure

1 participant