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
- 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:Debugging Data Issues
Data not showing up?Debugging Navigation Issues
Screen not appearing?Debugging Crash-Like Behavior
App freezing or behaving strangely?Reading Swift Error Messages
When Swift errors appear in logs, they often include useful info:Optional Unwrapping Errors
Array Index Errors
Type Casting Errors
Effective Logging Strategies
1. Log Entry and Exit
2. Log Important Values
3. Log Decision Points
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:Advanced: Console.app
For even more detailed debugging, you can use macOS’s Console app:- Open Console.app (in Applications → Utilities)
- Select your Simulator in the sidebar
- Run your app
- See comprehensive system logs
Troubleshooting
Logs aren't appearing
Logs aren't appearing
- Make sure your app is running
- Check you’re on the Logs tab
- Try adding explicit print statements
- Restart the Simulator
Too many logs to read
Too many logs to read
- Add distinctive prefixes to your logs
- Search for specific terms
- Ask the AI to reduce logging: “Only log errors, not normal operations”
Don't have logs tab
Don't have logs tab
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