This answer addresses how to show the console log in Xcode, but output printed with the print
function in Swift that appear in the development build of the app do not appear in the release build.
To be clear, the app was downloaded from the App Store and then Xcode was opened with the console log showing as described by the SO answer.
This answer suggests the print
function continues to send output to the console even for release builds.
However, lines that printed to the console for the development build no longer appear for the App Store version.
How do you view the same console output that appears for the development build?
The print function continues to send output even for release build, but it won't appear at the console. To see the output, go to Window -> Devices (or press cmd+shift+2). Connect your device to the Mac and you'll see all the output.
(By the way - it's good practice to remove the logs for the release versions, so you might want to consider it)
If you want to see the same logs from the release build, you need to use NSLog as before.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With