Getting Logs on iOS Devices
This article explains how to obtain iOS device logs using Mac, Windows and Linux devices.
Using Mac Device
- Connect your iOS device to a Mac.
- Select Trust this computer on the iOS pop-up request.
- Start the Console app and choose the relevant device.
- Select your connected iOS device, and you will see the iOS device logs being gathered.
- You can filter the log messages using the search bar on top right.
- Reproduce the problem.
- Highlight all of the log data.
- Copy the log messages using Command + C or Edit > Copy
- Open a text editor and paste the data
- Save this log file as a .log
Using Windows Device
- Install iTools on your Windows machine.
- Launch iTools.
- Connect your iOS device to the Windows machine through USB.
- Click on Toolbox.
- When you are ready to reproduce the issue, click on Real-time log under Advanced Features. You can see the logging happening in real time.
- Click on Save to save the log activities.
Using Ubuntu Device
- Install the libimobiledevice libraries.
sudo apt-get install libimobiledevice6 libimobiledevice4 libimobiledevice-utils ifuse usbmuxd libplist3 - Connect your iOS device to Ubuntu computer and check its availability:
dmesg |grep ipheth - If the device is recognized, check that it is paired with the computer:
$ idevicepair list
If desired, you can update the pairing:
$ idevicepair unpair
$ idevicepair pair - Select Trust this computer on the iOS pop-up request.
- Create the mount point:
$ sudo mkdir /mnt/iphone - Change access rights:
$ sudo chmod 777 /mnt/iphone/ - Run the iOS device multiplexer daemon. We recommend that you run the service interactively in a separate terminal window while debugging:
$ sudo usbmuxd -fv
If you need to stop the daemon later, use the command
$ sudo usbmuxd -X - Reproduce the problem.
- Mount the iOS file system to the previously created mount point:
$ ifuse /mnt/iphone/
The command is executed without the “sudo” prefix. |
- Run the command:
idevicesyslog | grep <your app name>
This will show you all debug info and logs from NSLog statements.
You can unmount the iOS file system using the standard command: $ umount /mnt/iphone |