Skip to content

fix: add tvOS availability annotations for iOS 26 APIs#508

Open
oscnord wants to merge 1 commit intocallstack:mainfrom
oscnord:fix/tvos-compilation
Open

fix: add tvOS availability annotations for iOS 26 APIs#508
oscnord wants to merge 1 commit intocallstack:mainfrom
oscnord:fix/tvos-compilation

Conversation

@oscnord
Copy link
Copy Markdown

@oscnord oscnord commented Mar 27, 2026

Summary

Building for tvOS fails with compilation errors because several iOS 26 APIs lack tvOS availability annotations.

Errors fixed:

  • BottomAccessoryProvider.swiftTabViewBottomAccessoryPlacement needs @available(tvOS 26.0)
  • NewTabView.swift.tabViewBottomAccessory modifier is unavailable on tvOS, excluded via #if !os(tvOS)
  • TabViewProps.swiftTabBarMinimizeBehavior enum values (.never, .onScrollUp, .onScrollDown) are unavailable on tvOS, falls back to .automatic
  • TabViewImpl.swifttabBarMinimizeBehavior modifier needs tvOS 26.0 in #available check

Changes:

  • Added tvOS 26.0 to @available / #available annotations where the API exists on tvOS
  • Excluded tabViewBottomAccessory and BottomAccessoryRepresentableView from tvOS via #if (API doesn't exist on tvOS at all)
  • Removed tvOS 26.0 from the #available(iOS 26.0, tvOS 26.0, visionOS 3.0, *) check in NewTabView.swift — the original included tvOS in the runtime check, but tabViewBottomAccessory doesn't exist on tvOS even in 26.0, so the check would pass but compilation would fail. The block is now excluded at compile time via #if os(tvOS) instead.
  • Fall back to .automatic for MinimizeBehavior.convert() on tvOS (same as macOS)

Tested:

  • tvOS build compiles successfully with these changes

Several iOS 26 APIs used in the library lack tvOS availability annotations,
causing compilation failures when building for tvOS:

- `TabViewBottomAccessoryPlacement` needs `tvOS 26.0` availability
- `.tabViewBottomAccessory` modifier is unavailable on tvOS — excluded via `#if`
- `TabBarMinimizeBehavior` enum values (.never, .onScrollUp, .onScrollDown) are
  unavailable on tvOS — falls back to `.automatic`
- `tabBarMinimizeBehavior` view modifier needs `tvOS 26.0` availability check
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