ios - logs - xcode console log

Xcode 7: show same console log for release build as development build? (3)

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?

1) Connect your device to your mac machine

2) Open Xcode

3) Go to Window -> Device (select your device)

You can see console log as output

If you want to see the same logs from the release build, you need to use NSLog as before.

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)