ios logs Xcode 7: show same console log for release build as development build?
xcode console log (4)
If you want to see the same logs from the release build, you need to use NSLog as before.
This answer addresses how to show the console log in Xcode, but output printed with the
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
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
The log should appear in console normally for development version. Make sure you use -D DEBUG flag only for other linker flags of Debug, and not on release. Expand "Other linker flags" first to notice multiple values.
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)