# How to obtain iOS device logs using Mac and Windows

This article explains how to obtain iOS device logs using Windows and Mac devices.

 Using Mac Device
-----------------

### Using Apple Configurator 2

1. First, [install](https://itunes.apple.com/us/app/apple-configurator-2/id1037126344?mt=12) Apple Configurator 2 from App Store and launch the application.
2. Connect your iOS device to the mac through USB. On the device screen, you will be asked if you trust the computer. Tap **Trust**.
3. By default, all the connected devices will appear on the home screen. Double click on the device you wish to get the logs from.
4. Click on **Console** from the menu on the top left corner of the new window. You can see the log activities on the screen.
5. Click on **Clear** to clear the screen and perform the necessary actions (for example, an app crash) you wish to.
6. Click on **Save** button to save the logs.

### Using Xcode

1. First, [install](https://itunes.apple.com/us/app/xcode/id497799835?mt=12) Xcode on your mac machine. Next, launch Xcode.
2. Connect your iOS device to the Mac through USB.
3. Launch Xcode. Go to **Windows > Devices and Simulators**.
4. Reproduce the problem you encountered.
5. Choose your device from the devices section on the left side of the screen.
6. Click on the up-triangle on the bottom of the screen to view device logs.
7. Click on the down arrow on the bottom right of the screen to save the device logs as a file.
8. Select **View Device Logs** button under the **Device Information** section on the right-hand panel to view crash logs.
9. Under **Process** column on the left, identify and select your app and click on **Crash Log** to see the contents.
10. Right click the corresponding app entry on the Process Column and click on **Export Log** to save the crash log.

Using Windows
-------------

### Using iTools

1. [Install](https://itools-for-windows.en.softonic.com/) iTools on your Windows machine.
2. Launch **iTools**.
3. Connect your iOS device to the Windows machine through USB.
4. Click on **Toolbox**.
5. 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.
6. Click on **Save** to save the log activities.

### Using iOSLogInfo

 Note: You must have iTunes installed on your Windows machine before you start using iOSLogInfo.

 

1. Install **iOSLogInfo** on your device.
2. Extract the contents of the folder to the local hard drive.
3. Connect your iOS device to the Windows machine through a cable.
4. Open a new command prompt and make sure that you run as administrator.
5. On your command prompt, use the following command to navigate to the location where you have extracted the files.
    For example, if I have extracted the files to my C drive, the command would be as follows:
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    cd C:\\iOSLogInfo
    
       1
    
    
    
      cd C:\\iOSLogInfo
6. Type in the following command to start capturing the device log to a file. Give a suitable name for the file.
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    sdsiosloginfo.exe -d C:\\iOSLogInfo\\logfile.txt
    
       1
    
    
    
      sdsiosloginfo.exe -d C:\\iOSLogInfo\\logfile.txt
7. Reproduce the action causing the issue.
8. Click **CTRL+C** to stop logging.
9. A new text file(logfile.txt) will be created in the iOSLogInfo folder.

Few additional commands are available:

- **Capture console logs:**

sdsiosloginfo.exe -d &gt; C:\\iOSLogInfo\\consolelogs.log

   1

  sdsiosloginfo.exe -d &gt; C:\\iOSLogInfo\\consolelogs.log

   

 

 - **Capture Crash logs:**
Create a new folder(CrashLogs) to store your crash logs.

sdsioscrashlog.exe -e -k C:\\iOSLogInfo\\CrashLogs

   1

  sdsioscrashlog.exe -e -k C:\\iOSLogInfo\\CrashLogs

   

 

 - **Pull disk\_usage:**

sdsdeviceinfo.exe -q com.apple.disk\_usage -x &gt; C:\\iOSLogInfo\\iOS\_Disk\_Usage.xml

   1

  sdsdeviceinfo.exe -q com.apple.disk\_usage -x &gt; C:\\iOSLogInfo\\iOS\_Disk\_Usage.xml

   

 

 - **Pull Device Stats:**

sdsdeviceinfo.exe -x &gt; C:\\iOSLogInfo\\iOS\_Device\_Stats.xml

   1

  sdsdeviceinfo.exe -x &gt; C:\\iOSLogInfo\\iOS\_Device\_Stats.xml

   

 

 - **Pull iTunes logs:**

sdsioscrashlog.exe -e -k C:\\iOSLogInfo\\ItunesLogs

   1

  sdsioscrashlog.exe -e -k C:\\iOSLogInfo\\ItunesLogs