Skip to content

Commit ac97ff2

Browse files
authored
feat: add Apple TV support (#80)
* feat: add Apple TV support * Update ios/TabViewImpl.swift
1 parent 9c3e8f3 commit ac97ff2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ios/TabViewImpl.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,13 @@ extension View {
188188

189189
@ViewBuilder
190190
func tabBadge(_ data: String?) -> some View {
191-
if #available(iOS 15.0, macOS 15.0, visionOS 2.0, *) {
191+
if #available(iOS 15.0, macOS 15.0, visionOS 2.0, tvOS 15.0, *) {
192192
if let data = data, !data.isEmpty {
193+
#if !os(tvOS)
193194
self.badge(data)
195+
#else
196+
self
197+
#endif
194198
} else {
195199
self
196200
}

react-native-bottom-tabs.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
1212
s.license = package["license"]
1313
s.authors = package["author"]
1414

15-
s.platforms = { :ios => "14.0", :visionos => "1.0" }
15+
s.platforms = { :ios => "14.0", :visionos => "1.0", :tvos => "15.1" }
1616
s.source = { :git => "https://github.com/okwasniewski/react-native-bottom-tabs.git", :tag => "#{s.version}" }
1717

1818
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"

0 commit comments

Comments
 (0)