Flashduty Docs
中文English
RoadmapAPI官网控制台
中文English
RoadmapAPI官网控制台
  1. Error Reporting
  • Introduction
  • On-call
    • Getting Started
      • Quick start
      • FAQ
      • Product Comparison
    • Incidents
      • What is an Incident
      • View Incidents
      • Handle Incidents
      • Escalations and Assignments
      • Custom Fields
      • Custom Actions
      • Alert Noise Reduction
      • Past Incidents
      • Outlier Incidents
      • Status Pages
    • Configure On-call
      • Channels
      • Integrate Alerts
      • Alert Noise Reduction
      • Escalation Rules
      • Label Enrichment
      • Schedules
      • Templates
      • Service Calendars
      • Preferences
      • Alert Routing
      • Silence and Inhibition
      • Filters
      • Notifications
      • Alert Pipeline
    • Advanced Features
      • Referencing Variables
      • Dynamic Assignment
      • Insights
      • War-room
    • Integrations
      • Alerts integration
        • Standard Alert Integration
        • Email Integration
        • Nightingale/FlashCat Integration
        • Prometheus Integration
        • Grafana Integration
        • Zabbix Integration
        • Uptime Kuma Integration
        • Alibaba Cloud ARMS Integration
        • Alibaba Cloud Monitor CM Event Integration
        • Alibaba Cloud Monitor CM Metrics Integration
        • Alibaba Cloud SLS Integration
        • AWS CloudWatch Integration
        • Azure Monitor Integration
        • Baidu Cloud BCM Integration
        • Huawei Cloud CES Integration
        • Influxdata Integration
        • Open Falcon Integration
        • PagerDuty Integration
        • Tencent BlueKing Integration
        • Tencent Cloud CLS Integration
        • Tencent Cloud Monitor CM Integration
        • Tencent Cloud EventBridge
        • OceanBase Integration
        • Graylog Integration
        • Skywalking Integration
        • Sentry Integration
        • Jiankongbao Integration
        • AWS EventBridge Integration
        • Dynatrace Integration
        • Huawei Cloud LTS Integration
        • GCP Integration
        • Splunk Alert Events Integration
        • AppDynamics Alert Integration
        • SolarWinds Alert Events Integration
        • Volcengine CM Alert Events Integration
        • Volcengine CM Event Center Integration
        • Volcengine TLS Integration
        • OpManager Integration
        • Meraki Integration
        • Keep Integration
        • ElastAlert2 Alert Integration
        • StateCloud Alert Events
        • Guance Alert Events
        • Zilliz Alert Events
        • Huawei Cloud APM Alerts
        • zstack integration
        • Monit Alert Integration
        • RUM Alert Integration
      • Change integration
        • Standard Change Event
        • Jira Issue Events
      • IM integration
        • Feishu (Lark) Integration Guide
        • Dingtalk Integration
        • WeCom Integration
        • Slack Integration
        • Microsoft Teams Integration
      • Single Sign-On
        • Authing Integration
        • Keycloak Guide
        • OpenLDAP Guide
      • Webhooks
        • Alert webhook
        • Incident webhook
        • Costom action
        • ServiceNow Sync
        • Jira Sync
      • Other
        • Link Integration
  • RUM
    • Getting Started
      • Introduction
      • Quick Start
      • Application Management
    • SDK Integration
      • Android
        • SDK Integration
        • Advanced Configuration
        • Data Collection
        • Compatibility
      • iOS
        • SDK Integration
        • Advanced Configuration
        • Data Collection
        • Compatibility
      • Web
        • SDK Integration
        • Advanced Configuration
        • Data Collection
        • Compatibility
        • FAQ
    • Session Explorer
      • Overview
      • Data Query
    • Analysis Dashboard
      • Web
      • Native
    • Performance Monitoring
      • Performance Optimize
      • Metrics
      • Overview
      • Performance Analysis
    • Error Tracking
      • Overview
      • Issue Status
      • Issue Alerting
      • Issues
      • Error Grouping
      • Source Mapping
      • Error Reporting
        • Web
        • Android
        • iOS
    • Best Practice
      • Distributed Tracing
    • Session Replay
      • Overview
      • SDK Configuration
      • View Session Replay
      • Privacy Protection
    • Others
      • Data Collection
      • Terminology
      • Data Security
  • Monitors
    • Getting Started
      • Introduction
      • Quick Start
    • Alert Rules
      • Prometheus
      • ElasticSearch
      • Loki
      • ClickHouse
      • MySQL
      • Oracle
      • PostgreSQL
      • Aliyun SLS
      • VictoriaLogs
    • FAQ
      • FAQ
  • Platform
    • Teams and Members
    • Permissions
    • Single Sign-On
  • Terms
    • Terms of Service
    • User Agreement/Privary Policy
    • SLA
    • Data Security
中文English
RoadmapAPI官网控制台
中文English
RoadmapAPI官网控制台
  1. Error Reporting

iOS

iOS Error Reporting#

Overview#

This document introduces the Flashcat iOS RUM SDK's error capture mechanism, including application crashes, App Hangs, Watchdog terminations, manual error reporting, and dSYM symbol file uploads.

Error Types#

Flashcat iOS RUM can monitor the following types of errors:

Application Crashes#

The SDK automatically captures unhandled exceptions and fatal signals, including:
Uncaught Swift/Objective-C exceptions
Fatal signals (such as SIGSEGV, SIGABRT)
Mach exceptions

App Hangs#

When the main thread is blocked beyond a specified threshold, the SDK detects and reports App Hang events, helping you identify performance issues affecting user experience.

Watchdog Terminations#

iOS's Watchdog mechanism terminates applications that are unresponsive for extended periods. The SDK can detect these terminations and report them as crash events.

Custom Errors#

In addition to automatically captured errors, you can manually report custom errors using the RUM SDK to track specific issues such as business logic errors.

Configure Crash Reporting#

Add Crash Reporting Module#

To enable crash reporting, you need to add the FlashcatCrashReporting module.

Swift Package Manager#

When adding package dependencies in Xcode, include the following modules:
FlashcatCore: Core SDK
FlashcatRUM: RUM functionality module
FlashcatCrashReporting: Crash reporting module

Initialize Crash Reporting#

Enable crash reporting after SDK initialization:
提示
It's recommended to initialize the SDK and crash reporting as early as possible in application(_:didFinishLaunchingWithOptions:) to ensure crashes during app launch are captured.

Configure App Hang Detection#

App Hang refers to situations where the main thread is blocked, causing the application to become unresponsive to user input. The SDK can detect and report these issues.

Enable App Hang Tracking#

Set the appHangThreshold parameter in the RUM configuration:

App Hang Threshold Description#

ThresholdDescription
0.25250 milliseconds, detect minor freezes
1.01 second, detect noticeable freezes
nilDisable App Hang detection (default)
提示
Setting too low a threshold may generate excessive reports; adjust based on your application's actual requirements.
If an App Hang causes the application to be terminated by Watchdog, the event will be marked as a crash.

Configure Watchdog Termination Tracking#

iOS's Watchdog mechanism terminates applications that are unresponsive for extended periods. The SDK can detect and report these terminations on the next app launch.

Enable Watchdog Termination Tracking#

Watchdog Termination Detection Conditions#

The SDK will classify the previous app termination as a Watchdog termination when all the following conditions are met:
The app was not force-quit by the user
No crash or fatal error occurred during the previous run
The app was not upgraded
The app was in the foreground and responding to events

Manual Error Reporting#

Through the addError API, you can manually report handled exceptions, custom errors, or other errors not automatically captured.

Example: Reporting Errors#

Error Source Types#

SourceDescription
.sourceSource error
.networkNetwork error
.webviewWebView error
.consoleConsole error
.customCustom error

Example: Reporting Error Objects#

Get Symbolicated Stack Traces#

Crash report stacks are memory addresses by default. By uploading dSYM symbol files, these addresses can be converted to readable function names, file names, and line numbers.

What is a dSYM File#

dSYM (Debug Symbol) files contain the application's debug symbol information, used to map memory addresses in crash stacks to source code locations.

Upload dSYM Using Command Line Tool#

Step 1: Install flashcat-ci Tool#

Step 2: Upload dSYM Files#

Supported File Formats#

.dSYM directories
.dSYM.zip archives
.zip archives containing multiple dSYMs

Integrate dSYM Upload in CI/CD#

Xcode Build Phase Script#

Add a Run Script in your Xcode project's Build Phases:

Fastlane Integration#

Add an upload step in your Fastfile:

dSYM for Bitcode Applications#

If your application has Bitcode enabled, Apple will recompile the app during App Store processing, generating new dSYM files. You need to download these dSYMs from App Store Connect and upload them.

Download Bitcode dSYM#

1.
Log in to App Store Connect
2.
Navigate to your app > Activity > Select a build version
3.
Click "Download dSYM"

dSYM File Limitations#

Each dSYM file size is limited to 2 GB
Only crashes from real devices support symbolication; crashes from simulators are not supported

Track Background Events#

By default, only crashes that occur while a view is active are tracked. If you want to track crashes when the app is in the background, enable background event tracking:
警告
Tracking background events may generate additional sessions, which could affect billing. If you have questions, please contact the Flashcat support team.

Limitations and Considerations#

Crash Detection Limitations#

SDK initialization timing: Crashes can only be detected after the SDK and CrashReporting.enable() are called. Initialize as early as possible.
Debugger interference: When the Xcode debugger is attached, crashes are captured by the debugger instead of the SDK. Test crash reporting without the debugger attached.
Crash report upload timing: Crash reports are uploaded on the next app launch, so you need to restart the app after a crash to see the report.

Symbolication Limitations#

Only crashes from real devices support symbolication; simulator crashes are not supported.
Each release version requires uploading the corresponding dSYM files.
If using Bitcode, download and upload regenerated dSYMs from App Store Connect.

App Hang Detection Limitations#

App Hang detection only works when the app is in the foreground.
Detection accuracy depends on the threshold setting; too low a threshold may produce many false positives.

Test Verification#

Verify Crash Reporting#

1.
Run the app without the debugger attached: Stop the app from Xcode, then launch directly from the device.
2.
Trigger a test crash:
3.
Restart the app: After the crash occurs, restart the app from the device and wait for the SDK to upload the crash report.
4.
View the report: Check the crash report in the Flashcat console's Error Tracking module.

Verify App Hang#

1.
Execute a time-consuming operation on the main thread:
2.
After triggering, try to interact with the app.
3.
Check if the Flashcat console received an App Hang report.

Verify Symbolication#

1.
Ensure the corresponding version's dSYM file has been uploaded.
2.
Trigger a crash and view the report.
3.
Confirm the stack shows function names, file names, and line numbers instead of raw memory addresses.

Error Data Structure#

Each error record contains the following properties:
PropertyTypeDescription
error.sourcestringError source (such as source, network, custom)
error.typestringError type (such as NSException, Signal)
error.messagestringError message
error.stackstringError stack trace
error.is_crashbooleanWhether it's a crash
contextObjectCustom context information, passed through addError's attributes

Best Practices#

1.
Initialize SDK early: Call Flashcat.initialize() and CrashReporting.enable() as early as possible in application(_:didFinishLaunchingWithOptions:).
2.
Upload dSYM correctly:
Upload corresponding dSYM files for each release version
Integrate dSYM upload in your CI/CD pipeline
If using Bitcode, promptly download and upload dSYMs from App Store Connect
3.
Set reasonable App Hang thresholds: Set appropriate thresholds based on your app's performance requirements to avoid excessive false positives.
4.
Enrich error context: Attach business-related context information (such as user ID, operation type) when manually reporting errors.
5.
Disconnect debugger during testing: Ensure the Xcode debugger is not attached when verifying crash reporting functionality.

Next Steps#

View Errors
iOS SDK Advanced Configuration

添加官方技术支持微信

在这里,获得使用上的任何帮助,快速上手FlashDuty

微信扫码交流
修改于 2026-01-16 12:00:56
上一页
Android
下一页
Distributed Tracing
Built with