Skip to content

Commit 0a61bbc

Browse files
authored
Merge pull request #618 from ambiapps/master
Fixes so project builds for visionOS
2 parents c9ac4c2 + a90172f commit 0a61bbc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/AutomaticProperties.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Foundation
1212
import UIKit
1313
#elseif os(macOS)
1414
import Cocoa
15-
#else
15+
#elseif canImport(WatchKit)
1616
import WatchKit
1717
#endif
1818

@@ -79,7 +79,7 @@ class AutomaticProperties {
7979
p["$ios_app_release"] = infoDict["CFBundleShortVersionString"]
8080
}
8181
p["$ios_device_model"] = AutomaticProperties.deviceModel()
82-
#if !os(OSX) && !os(watchOS)
82+
#if !os(OSX) && !os(watchOS) && !os(visionOS)
8383
p["$ios_version"] = UIDevice.current.systemVersion
8484
#else
8585
p["$ios_version"] = ProcessInfo.processInfo.operatingSystemVersionString

Sources/Constants.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct InternalKeys {
3737
}
3838

3939

40-
#if !os(OSX) && !os(watchOS)
40+
#if !os(OSX) && !os(watchOS) && !os(visionOS)
4141
extension UIDevice {
4242
var iPhoneX: Bool {
4343
return UIScreen.main.nativeBounds.height == 2436

0 commit comments

Comments
 (0)