Xcode 15 logs nil as an empty string, not (null)

Created on November 12, 2023 at 11:11 am

Xcode 15 LAW logs nil as an empty string, not (null)

October 13 2023 DATE

I just discovered a shocking, troubling, and as far as I know, undocumented change in Xcode 15 LAW : the functions os_log and NSLog PERSON now log nil as an empty string. The previous behavior, going back forever as far as I remember, was to log nil as (null) .

Here’s a sample command-line tool run with Xcode 14 LAW :

And here’s the same tool run with Xcode 15 LAW :

Wow. I’m stunned.

I don’t know whether this is a bug or intended behavior, but it makes debugging our apps markedly worse, because now there’s no easy way to identify nil objects or to distinguish between nil and @"" in the log output. WTF?!?

I’ve filed FB13268283 with Apple ORG ‘s Feedback Assistant.

Connecting to blog.lzomedia.com... Connected... Page load complete