On macOS Tahoe (26.0), the call sysctlbyname for kern.osproductversion returns 16.0

The objective C code using the kernel API ‘sysctlbyname’ for ‘kern.osproductversion’ returns 16.0 instead of 26.0 on macOS Tahoe.

sysctlbyname("kern.osproductversion", version, &size, NULL, 0)

The command ‘sysctl kern.osproductversion’ returns ‘kern.osproductversion: 26.0’ on same macOS Tahoe.

Note: The objective C code was built using Xcode 16.3.

Answered by DTS Engineer in 847988022

Yep. You would’ve seen the same thing during the macOS 10.15 to macOS 11 version number discontinuity. If you build with Xcode 26 beta, and thus the Xcode 26 beta SDK, it’ll start returning 26.0.

I provide more background to this phenomenon in this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Yep. You would’ve seen the same thing during the macOS 10.15 to macOS 11 version number discontinuity. If you build with Xcode 26 beta, and thus the Xcode 26 beta SDK, it’ll start returning 26.0.

I provide more background to this phenomenon in this thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

This issue is no more seen in macOS Tahoe Beta 3.

On macOS Tahoe (26.0), the call sysctlbyname for kern.osproductversion returns 16.0
 
 
Q