Which macOS version first exports Logger.isEnabled(type:)?

An app built with Xcode 27.1 for a macOS 15 deployment target called Logger.isEnabled(type:). In the SDK's swiftinterface the method sits under Logger's @available(macOS 11.0, ...) with no availability of its own, so it compiled without a warning. On macOS 15.6.1, libswiftos.dylib doesn't export it, and dyld stopped the app at launch:

Symbol not found: _$s2os6LoggerV9isEnabled4typeSbSo0a5_log_E2_ta_tF
Expected in: /usr/lib/swift/libswiftos.dylib

The macOS 15.5 SDK's libswiftos.tbd doesn't list the symbol and the 27 SDK does. I haven't checked macOS 26. Switching to OSLog.isEnabled(type:) fixed it.

Which macOS version first exports this symbol?

Write-up: https://yardlet.app/blog/logger-isenabled-macos-15.html

Answered by DTS Engineer in 914801022

First up, some context. zzunkie raised this on Swift Forums and I requested they bounce over here.

Also, as part of that conversation I filed an internal bug about this availability mismatch (r. 191666304).

And as part of that I created a small test project to check this issue. It works on macOS 26.7.1:

% sw_vers
ProductName:		macOS
ProductVersion:		26.7.1
BuildVersion:		25G241
% dyld_info -imports TestLoggerIsEnabled | grep isEnabled
      0x0008  _$s2os6LoggerV9isEnabled4typeSbSo0a5_log_E2_ta_tF  (from libswiftos)
% ./TestLoggerIsEnabled
true

I happened to have a 26.2 VM lying around, so I used that to confirm
Etresoft’s result:

% sw_vers
ProductName:		macOS
ProductVersion:		26.2
BuildVersion:		25C56
% ./TestLoggerIsEnabled 
dyld[676]: Symbol not found: _$s2os6LoggerV9isEnabled4typeSbSo0a5_log_E2_ta_tF
…

That makes it a lot more feasible to track down when this got added. Some spelunking in Radar suggests that it was added in macOS 26.4.

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

No such method exists in Xcode 26.2.

Thanks, that fits what I saw: the macOS 15.5 SDK doesn't have it either, and the macOS 27 SDK in Xcode 27.1 does, with no availability of its own beyond Logger's macOS 11.0. So what I'm still after is whether macOS 27 is the first release whose libswiftos.dylib exports it, or whether a 26.x update already does.

First up, some context. zzunkie raised this on Swift Forums and I requested they bounce over here.

Also, as part of that conversation I filed an internal bug about this availability mismatch (r. 191666304).

And as part of that I created a small test project to check this issue. It works on macOS 26.7.1:

% sw_vers
ProductName:		macOS
ProductVersion:		26.7.1
BuildVersion:		25G241
% dyld_info -imports TestLoggerIsEnabled | grep isEnabled
      0x0008  _$s2os6LoggerV9isEnabled4typeSbSo0a5_log_E2_ta_tF  (from libswiftos)
% ./TestLoggerIsEnabled
true

I happened to have a 26.2 VM lying around, so I used that to confirm
Etresoft’s result:

% sw_vers
ProductName:		macOS
ProductVersion:		26.2
BuildVersion:		25C56
% ./TestLoggerIsEnabled 
dyld[676]: Symbol not found: _$s2os6LoggerV9isEnabled4typeSbSo0a5_log_E2_ta_tF
…

That makes it a lot more feasible to track down when this got added. Some spelunking in Radar suggests that it was added in macOS 26.4.

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