Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print() and NSLog output on IOS device

Tags:

ios

swift

Where can I find the output from my print() and NSLog statements when the app is running on my iOS device?

I can't find it in the console log.

like image 990
Stalle Avatar asked Mar 14 '23 01:03

Stalle


2 Answers

On Xcode 7.2

Go to Xcode --> Window --> Devices.

Select the device, click in the left botton of the white screen in the button points up.

enter image description here

You can also see crash log of your apps clicking in the Device Logs at the same screen.

like image 63
Ulysses Avatar answered Mar 29 '23 19:03

Ulysses


As some have already mentioned, if you have your device connected using a cable, you should get the logs directly into XCode console.

Also, if you are running the app without having it connected, you can later connect the device to your computer and open XCode. From the Device organizer you can get the past logs.

I recommend you also to take a look at Bugfender, it's a product we have built to solve this problem when we don't have access to our customers devices. With Bugfender you can get the logs from any devices even if you don't have direct access to it.

It's easy to integrate and you can choose which devices you want to get the logs from. Our service works offline and online, we have spent a lot of time to make it reliable and easy to use.

like image 29
ventayol Avatar answered Mar 29 '23 20:03

ventayol