Skip to content
Merged
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
16 changes: 12 additions & 4 deletions Sources/PlatformVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ extension iOSVersion {
if #available(iOS 27, *) {
return .past
}
if #available(iOS 26, *) {
// Apps built before the iOS 26 SDK get "19.0" as the system version from ProcessInfo.
// Once built with the iOS 26 SDK, the version then becomes "26.0".
if #available(iOS 19, *) {
return .current
}
return .future
Expand Down Expand Up @@ -238,7 +240,9 @@ extension tvOSVersion {
if #available(tvOS 27, *) {
return .past
}
if #available(tvOS 26, *) {
// Apps built before the tvOS 26 SDK get "19.0" as the system version from ProcessInfo.
// Once built with the tvOS 26 SDK, the version then becomes "26.0".
if #available(tvOS 19, *) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know this for sure, I'm just assuming based on what the iOS SDK does. In any case it's safe to do as tvOS 19 will never actually exist.

return .current
}
return .future
Expand Down Expand Up @@ -362,7 +366,9 @@ extension macOSVersion {
if #available(macOS 27, *) {
return .past
}
if #available(macOS 26, *) {
// Apps built before the macOS 26 SDK get "16.0" as the system version from ProcessInfo.
// Once built with the macOS 26 SDK, the version then becomes "26.0".
if #available(macOS 16, *) {
Copy link
Collaborator Author

@davdroman davdroman Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know this for sure, I'm just assuming based on what the iOS SDK does. In any case it's safe to do as macOS 16 will never actually exist.

return .current
}
return .future
Expand Down Expand Up @@ -416,7 +422,9 @@ extension visionOSVersion {
if #available(visionOS 27, *) {
return .past
}
if #available(visionOS 26, *) {
// Apps built before the visionOS 26 SDK get "3.0" as the system version from ProcessInfo.
// Once built with the visionOS 26 SDK, the version then becomes "26.0".
if #available(visionOS 3, *) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know this for sure, I'm just assuming based on what the iOS SDK does. In any case it's safe to do as visionOS 3 will never actually exist.

return .current
}
return .future
Expand Down