Skip to main content
Learn how to view logs from iOS devices and simulators for debugging React Native applications.

Overview

iOS logging can be viewed through multiple tools including Console.app, Xcode, command-line utilities, and third-party applications.

Quick Start

View Logs from Simulator

View Logs from Device

Or use Console.app (macOS built-in application).

Using Console.app

Console.app is macOS’s built-in log viewer.
1

Open Console.app

  • Press Cmd+Space and type “Console”
  • Or find it in /Applications/Utilities/Console.app
2

Select device

  • Connected devices appear in the sidebar
  • Select your iPhone/iPad or Simulator
3

Filter logs

In the search bar, enter:
  • Process: YourApp
  • Category: ReactNativeJS
  • Or custom filter expressions

Useful Filters

  • Your app only: process:"YourApp"
  • React Native: category:"ReactNativeJS"
  • Errors only: level:error
  • Combined: process:"YourApp" AND level:error

Using Xcode

Xcode provides integrated log viewing.
1

Open project

2

Run app

  • Press Cmd+R or click Run button
  • App builds and launches
3

View logs

  • Open Debug area (Cmd+Shift+Y)
  • Logs appear in the console pane
  • Click filter icon for options

Xcode Console Features

  • Filter by level: Error, Warning, Info, Debug
  • Search: Use search bar to find specific messages
  • Clear: Click trash icon to clear console
  • Export: Right-click to save logs

Command Line Tools

Simulator Logs

Basic Stream

Shows all simulator logs (very verbose).

Filter by Process

Filter by Category

Filter by Level

Levels: default, info, debug, error, fault

Multiple Filters

Device Logs

Using idevicesyslog

Install libimobiledevice:
View logs:
Filter:

Using log Command (macOS Catalina+)

Save Logs to File

JavaScript Console Logs

console.log()

Appears as:

console.warn()

Shows yellow warning box in app and appears in logs.

console.error()

Shows red error screen in app and appears in logs.

console.debug()

Formatted Logging

Native Logs

Objective-C

Swift

NSLog

os_log (Modern)

React Native Debugger

Install

Use

  1. Start React Native Debugger
  2. Open developer menu in app (Cmd+D)
  3. Select “Debug”
  4. Logs appear in debugger console
Features:
  • Console logs
  • Network inspector
  • React DevTools
  • Redux DevTools

Flipper

Facebook’s debugging platform for React Native.

Install

Setup

Follow Flipper setup guide.

Features

  • Logs: Real-time log viewer
  • Layout Inspector: View hierarchy
  • Network: HTTP/HTTPS requests
  • Databases: Browse app databases
  • Crash Reporter: Native crash reports
  • React DevTools: Component inspector

Safari Web Inspector

For debugging JSCore (non-Hermes):
1

Enable Web Inspector

On device: Settings > Safari > Advanced > Web Inspector
2

Open Safari

On Mac, open Safari
3

Connect

Develop menu > [Your Device] > JSContext
4

Debug

Use Safari DevTools console
This only works with JavaScriptCore, not Hermes.

Crash Logs

View Recent Crashes

From Xcode

  1. Window > Devices and Simulators
  2. Select device
  3. Click View Device Logs
  4. Find crash reports

From Finder

Simulator crashes:
Device crashes (synced):

Symbolicate Crash Reports

Performance Monitoring

Instruments

Xcode’s performance analysis tool:
  1. In Xcode: Product > Profile (Cmd+I)
  2. Choose template:
    • Time Profiler: CPU usage
    • Allocations: Memory usage
    • Leaks: Memory leaks
    • Network: Network activity
  3. Record and analyze

React DevTools Profiler

  1. Open React Native Debugger or Flipper
  2. Go to Profiler tab
  3. Click Record
  4. Interact with app
  5. Stop and analyze

Advanced Filtering

Predicate Syntax

Used with log stream:

Grep Patterns

Multiple Devices

List Simulators

Target Specific Simulator

List Devices

Target Specific Device

Log Levels

iOS uses these log levels (os_log):
  • Default: Standard log messages
  • Info: Informational messages
  • Debug: Debug messages (not persisted by default)
  • Error: Error messages
  • Fault: Critical errors

Configure Log Level

In code:

Troubleshooting

No Logs Appearing

Solution:
  1. Verify device/simulator is selected
  2. Check filter settings
  3. Try restarting app
  4. Clear and restart

Too Verbose

Solution: Use specific filters:

Can’t Find Crash Logs

Solution:
  1. Xcode > Window > Devices and Simulators
  2. Select device
  3. View Device Logs
  4. Filter by date/process

idevicesyslog Not Working

Solution:

Best Practices

Use preprocessor directives:

Production Logging

For production apps, use error tracking services:
  • Sentry: @sentry/react-native
  • Bugsnag: @bugsnag/react-native
  • Firebase Crashlytics: @react-native-firebase/crashlytics
Example with Sentry:

Next Steps

Run iOS

Build and run your iOS app

Android Logs

View Android device logs

Debugging

Complete debugging guide

Troubleshooting

Common issues and solutions