Skip to content

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

Merged
thiagobrez merged 3 commits intocallstack:mainfrom
oscnord:fix/tvos-compilation
May 10, 2026
Merged

fix: add tvOS availability annotations for iOS 26 APIs#508
thiagobrez merged 3 commits intocallstack:mainfrom
oscnord:fix/tvos-compilation

Conversation

@oscnord
Copy link
Copy Markdown
Contributor

@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

oscnord added 2 commits March 27, 2026 09:34
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
@thiagobrez
Copy link
Copy Markdown
Collaborator

Thank you @oscnord! This looks very reasonable. I will be testing soon.

Copy link
Copy Markdown
Collaborator

@thiagobrez thiagobrez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested on a fresh new RN tvOS app. Thank you!

@thiagobrez thiagobrez added this pull request to the merge queue May 9, 2026
@thiagobrez thiagobrez removed this pull request from the merge queue due to a manual request May 9, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to Branch Protection failures May 9, 2026
You're not authorized to push to this branch. Visit "About protected branches" for more information.
@thiagobrez thiagobrez added this pull request to the merge queue May 10, 2026
Merged via the queue into callstack:main with commit 1c5b385 May 10, 2026
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.

2 participants