Skip to main content

Reading App Logs

Pro plan or higher required Build errors show problems at compile time. But what about issues that happen while your app is running? That’s where app logs come in.

What Are App Logs?

Logs are messages your app produces while running. They show:
  • What code is executing
  • Values of variables
  • Errors that occur at runtime
  • User actions and their effects

Accessing Logs in Nativeline

1

Open the Code Editor

Click the Code Editor tab in the Nativeline interface.
2

Switch to Logs View

Find and click the Logs tab or section within the Code Editor.
3

Run Your App

Build and run your app. Logs appear in real-time.
4

Watch the Output

As you interact with your app, logs show what’s happening.

Understanding Log Output

Basic Log Structure

Each line shows:
  • Timestamp: When it happened
  • App name: Which app
  • Message: The actual log content

Log Types


Adding Logs to Your App

Ask the AI to add logging:

For Debugging a Specific Feature

For Tracking User Actions

For API/Network Issues


Common Debugging Scenarios

Debugging “Nothing Happens” Issues

Your button doesn’t seem to work? Add logs:
If the log appears: The button works, the issue is in the code after. If no log appears: The button isn’t connected properly.

Debugging Data Issues

Data not showing up?
Check the logs to see if data exists and what it contains.

Debugging Navigation Issues

Screen not appearing?
Follow the trail to see where it breaks.

Debugging Crash-Like Behavior

App freezing or behaving strangely?
The last log before the freeze indicates where to look.

Reading Swift Error Messages

When Swift errors appear in logs, they often include useful info:

Optional Unwrapping Errors

Meaning: Your code tried to use a nil value that should have had a value. Fix: Ask the AI to add nil checking for the relevant variable.

Array Index Errors

Meaning: Accessing an array position that doesn’t exist. Fix: Check array bounds before accessing, or verify the data exists.

Type Casting Errors

Meaning: Tried to convert between incompatible types. Fix: Check the actual type and handle it appropriately.

Effective Logging Strategies

1. Log Entry and Exit

This shows whether functions complete or exit early.

2. Log Important Values

See what your variables actually contain.

3. Log Decision Points

Understand which code paths execute.

4. Use Distinctive Markers

Using emojis or prefixes makes logs easier to scan:
  • ▶️ Start of function
  • Success
  • Error
  • ⚠️ Warning
  • 📊 Data values
  • 🔄 State changes

Filtering and Searching Logs

When there’s a lot of output:

Search for Specific Text

Look for your custom log messages or error keywords.

Filter by Feature

If you’re debugging the save feature, search for “save” in logs.

Filter by Error Level

Look for “error”, “failed”, “nil”, or “crash” to find problems.

When to Use Logs vs Build Errors


Removing Debug Logs

Before publishing your app, clean up debug logs:
Or for more control:

Advanced: Console.app

For even more detailed debugging, you can use macOS’s Console app:
  1. Open Console.app (in Applications → Utilities)
  2. Select your Simulator in the sidebar
  3. Run your app
  4. See comprehensive system logs
This shows logs from iOS itself, not just your app.

Troubleshooting

  • Make sure your app is running
  • Check you’re on the Logs tab
  • Try adding explicit print statements
  • Restart the Simulator
  • Add distinctive prefixes to your logs
  • Search for specific terms
  • Ask the AI to reduce logging: “Only log errors, not normal operations”
The Logs feature requires Pro plan or higher. Check your subscription in Settings.

Next Steps

Debugging Guide

Complete debugging walkthrough

Code Editor

Full Code Editor documentation