Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-compiler-guards-ios26.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-native-bottom-tabs": patch
---

Add `#if compiler(>=6.2)` guards to iOS-26 SwiftUI symbols in BottomAccessoryProvider.swift and NewTabView.swift to fix compilation on Xcode < 26
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import SwiftUI
self.delegate = delegate
}

#if !os(macOS)
#if !os(macOS) && compiler(>=6.2)
@available(iOS 26.0, tvOS 26.0, *)
public func emitPlacementChanged(_ placement: TabViewBottomAccessoryPlacement?) {
var placementValue = "none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct ConditionalBottomAccessoryModifier: ViewModifier {
}

func body(content: Content) -> some View {
#if os(macOS) || os(tvOS)
#if os(macOS) || os(tvOS) || !compiler(>=6.2)
// tabViewBottomAccessory is not available on macOS
content
#else
Expand All @@ -96,7 +96,7 @@ struct ConditionalBottomAccessoryModifier: ViewModifier {

@ViewBuilder
private func renderBottomAccessoryView() -> some View {
#if !os(macOS) && !os(tvOS)
#if !os(macOS) && !os(tvOS) && compiler(>=6.2)
if let bottomAccessoryView {
if #available(iOS 26.0, *) {
BottomAccessoryRepresentableView(view: bottomAccessoryView)
Expand All @@ -106,7 +106,7 @@ struct ConditionalBottomAccessoryModifier: ViewModifier {
}
}

#if !os(macOS) && !os(tvOS)
#if !os(macOS) && !os(tvOS) && compiler(>=6.2)
@available(iOS 26.0, tvOS 26.0, *)
struct BottomAccessoryRepresentableView: PlatformViewRepresentable {
@Environment(\.tabViewBottomAccessoryPlacement) var tabViewBottomAccessoryPlacement
Expand Down