Back to Home

iOS Log Collection: 7 Ways for Debugging

The article describes 7 methods for collecting iOS logs: .ips via sysdiagnose, log collect CLI, Console. Examples of crashes EXC_BAD_ACCESS, JetsamEvent, network errors. For analyzing performance and bugs without Xcode.

7 iOS Log Methods: sysdiagnose and CLI
Advertisement 728x90

# Debugging iOS Apps: 7 Methods for Collecting System Logs

iOS logs capture internal app events: network requests, errors, UI freezes, and crashes. They help pinpoint issues without visual indicators. Examples include EXC_BAD_ACCESS in Pokemon GO, I/O on the main thread in Console, and CFNetwork timeouts in log collect.

Logs are divided into crash reports (EXC_BAD_ACCESS, SIGSEGV) and diagnostic ones (performance, network, memory). Testers use them to verify function calls, analyze server interactions, and uncover hidden bugs.

.ips Files via sysdiagnose

Automatically generated reports are available in Settings → Privacy & Security → Analytics & Improvements → Analytics Data. Format: event_type_date_time.ips, for example AtiClient-2024-08-14-152242.ips.

Google AdInline article slot

Report types:

  • CrashReport: exceptions and signals (by bundle ID, e.g., VKClient).
  • JetsamEvent: unloading due to RAM shortage (memory leaks).
  • Watchdog: launch timeouts or hangs.
  • SpinReport: high CPU usage without response (deadlocks).
  • NotificationServiceExtension: push notification failures.

Manual generation: simultaneously press volume buttons + side button (1–1.5 s), file stacks.

Export via AirDrop. Files are automatically deleted—collect them right away.

Google AdInline article slot

Use cases: failures without Xcode, memory/network analysis.

log collect CLI: Command-Line Tool for Archives

Requires Xcode Command Line Tools, USB connection, Terminal. Gets UDID via libimobiledevice.

Collects logs for up to 10 days (vs sysdiagnose—snapshot at the moment). Faster, automatable, controllable size.

Google AdInline article slot

Basic command:

sudo log collect --device-udid <UDID> --last 10m --output iphone_logs.logarchive

Key parameters:

  • --output ~/Desktop/iphone_logs.logarchive — save path.
  • --last 30m / 2h / 1d — time period.
  • --start "2025-08-20" --end "2025-08-20 14:30:00" — dates.
  • --size 100m — size limit.
  • --device-udid A1B2C3D4R5F8G8H8I1J0 — by UDID (preferred).

Analysis:

log show --archive system_logs.logarchive --predicate 'process == "AtiClient" AND messageType == "error"'

Filters: process, errors, time period.

Comparison with sysdiagnose:

| Parameter | log collect | sysdiagnose |

|----------|-------------|-------------|

| Time | up to 10 days | generation day |

| Automation | CLI | manual |

| Size | controllable | large |

| Speed | fast | 10–15 min |

Use cases: unstable bugs, performance trends, crash context.

Console: Live Monitoring

Xcode → Window → Devices and Simulators → Open Console. Filters by process (e.g., AtiClient). Shows real-time: Hang Risk on main thread, libRPAC.dylib failures.

Example log:

Hang Risk com.apple.runtime-issues
message: This method does I/O on the main thread...
libRPAC.dylib failure 19:12:18.350727+0300 AtiClient

Export to .logarchive for offline analysis.

Methods 4–7: Advanced Collection

  • Xcode Devices and Simulators: logs by UDID, filters by subsystem (CFNetwork, Jetsam).
  • libimobiledevice: idevicesyslog for streaming logs without Xcode.
idevicesyslog -u <UDID>
  • os_log in Code: custom logs via os_log_t and os_log API. Levels: debug, info, error.
  • Instruments: profiling with logs (Time Profiler, Leaks).

Key Takeaways

  • .ips for instant failures (CrashReport, Jetsam).
  • log collect for long-term trends (up to 10 days, CLI).
  • Console for live debugging of I/O on main thread.
  • UDID required for precise device targeting.
  • Combine methods: sysdiagnose + log show for full analysis.

— Editorial Team

Advertisement 728x90

Read Next