Skip to content

Commit 35d980d

Browse files
authored
fix: introspect on all future operating systems, make iOS 26 work (#359)
1 parent 927f930 commit 35d980d

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.changeset/wet-mammals-kiss.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'react-native-bottom-tabs': patch
3+
---
4+
5+
fix: introspect on all future operating systems, makes iOS 26 work

packages/react-native-bottom-tabs/ios/Extensions.swift

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Foundation
22
import SwiftUI
3+
@_spi(Advanced) import SwiftUIIntrospect
34

45
#if os(macOS)
56
import AppKit
@@ -54,15 +55,15 @@ extension PlatformImage {
5455
}
5556

5657
extension View {
57-
58+
5859
#if os(macOS)
5960
@MainActor
6061
@ViewBuilder
6162
func introspectTabView(closure: @escaping (NSTabView) -> Void) -> some View {
6263
self
6364
.introspect(
6465
.tabView,
65-
on: .macOS(.v11, .v12, .v13, .v14, .v15),
66+
on: .macOS(.v11...),
6667
customize: closure
6768
)
6869
}
@@ -74,15 +75,15 @@ extension View {
7475
#if !os(visionOS)
7576
.introspect(
7677
.tabView,
77-
on: .iOS(.v14, .v15, .v16, .v17, .v18),
78-
.tvOS(.v14,.v15, .v16, .v17, .v18),
78+
on: .iOS(.v14...),
79+
.tvOS(.v14...),
7980
customize: closure
8081
)
8182
#endif
8283
}
8384
#endif
84-
85-
85+
86+
8687
@MainActor
8788
@ViewBuilder
8889
func measureView(onLayout: @escaping (_ size: CGSize) -> Void) -> some View {
@@ -97,7 +98,7 @@ extension View {
9798
onLayout(geometry.size)
9899
}
99100
}
100-
.ignoresSafeArea(.all, edges: .all)
101+
.ignoresSafeArea(.all, edges: .all)
101102
)
102103
}
103104
}

0 commit comments

Comments
 (0)