Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): iOS builds on Xcode 27.0 no longer fail on 27.1-only hinge APIs #18913

MergedJeremiahDJordan(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/18913/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 4 additions and 2 deletions.

x
0 of 1 viewed, 1 left
4 additions and 2 deletionsapps/mobile/modules/t3-native-controls/ios/T3LayoutMetricsView.swiftModified
View file
@@ -14,7 +14,9 @@
registerForTraitChanges([UITraitHorizontalSizeClass.self, UITraitVerticalSizeClass.self]) { (view: T3LayoutMetricsView, _: UITraitCollection) in
view.publishMetrics()
- #if compiler(>=6.4)
+ // The hinge and vertical-bar APIs ship in the iOS 27.1 SDK, whose UIKit is 9127.0.85.
+ // Xcode 27.0 has Swift 6.4 but the 27.0 SDK (UIKit 9127.0.84), so gate on the SDK.
+ #if canImport(UIKit, _version: 9127.0.85)
if #available(iOS 27.1, *) {
hasHinge = nil
addInteraction(UIHingeInteraction { [weak self] _, update in
@@ -67,7 +69,7 @@
var verticalBarEdge = "none"
var regions: [[String: Any]] = []
- #if compiler(>=6.4)
+ #if canImport(UIKit, _version: 9127.0.85)
if #available(iOS 27.1, *) {
let rtl = effectiveUserInterfaceLayoutDirection == .rightToLeft
switch traitCollection.verticalBarEdge {