Xcode 15 Logs nil As an Empty String
[The] functions
os_log
andNSLog
now lognil
as an empty string. The previous behavior, going back forever as far as I remember, was to lognil
as(null)
.[…]
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 betweennil
and@""
in the log output.
This only affects logging within Xcode itself. Still not good, though.
I’ve now found three different bugs in the new Xcode 15 console.
[…]
Fortunately, I’ve found a way to restore the previous console behavior from Xcode 14 and earlier. This is actually noted in the Xcode 15 release notes, but I wanted to highlight the solution here in case, like me, you hadn’t read the release notes recently[…]
[…]
You need to set the environment variable
IDELogRedirectionPolicy
to the valueoslogToStdio
in the Run section of your app’s Xcode scheme. I wish there were a way to make this behavior the default in Xcode Settings!
Since then I’ve had some back and forth with Apple on that bug in Feedback Assistant. I’m going to screenshot the entire exchange below. For context, if you’re not familiar with Apple’s bug reporting system, they constantly ask developers to “Please verify this issue” with the latest betas, despite having done nothing to fix the issue in the latest betas, in the hope that the issue (or maybe the developer) will magically go away.
[…]
The ultimate outcome of this case was that Apple blatantly lied to me—“As you’ve indicated, this issue is resolved”—and then Apple refused to hear any contradiction to their lie—”this Feedback will no longer be monitored, and incoming messages will not be reviewed.” This kind of response reinforces what I said earlier in the exchange: “It makes me not want to file feedbacks at all. It feels like you don’t care.” The coup de grâce was “We appreciate your feedback.” No, Apple absolutely does not appreciate our feedback.
In this case, Apple considers it resolved because the problem doesn’t occur on Sonoma. But Xcode 15 is supposed to work on Ventura, and it should be fully functional there considering that Apple doesn’t support Xcode 14 on Sonoma.
Previously: