iOS and tvOS crash reporting

For New Relic Mobile version 4 or higher, New Relic produces crash reports for your mobile applications. When an iOS or tvOS application crashes, the operating system creates a crash report and stores it on the device. New Relic Mobile uploads this report to New Relic the next time the app launches.

Using this report and any relevant dSYM files, the crash report includes the complete stack trace with human-readable information. You can then log into New Relic Mobile and see each crash, including the method and line where it crashed, plus device and environment details.

dSYM files

When you create a release build of an iOS or tvOS application, the names of methods and classes are stripped, leaving only machine-readable memory addresses. When the application crashes, the stack trace consists of this machine-readable code.

A dSYM file is an Xcode project file for debug symbols. It contains the debugging symbols that allow for translation of the initial crash report to human-readable information. This process is known as symbolication.

New Relic Mobile has dynamic framework support for dSYM uploading. If your app uses a dynamic framework with multiple dSYM files, New Relic automatically uploads and uses those files.

For more information, see Retrieve and download dSYMs or Upload dSYM files.

Debug the crash reporter

Crash reporting is enabled by default, but there are some circumstances where it will be disabled:

  • If the debugger is enabled: There can only be one uncaught exception handler registered at a time per application. If running with the debugger attached, New Relic will not capture and report crashes.
  • If another crash reporter is enabled: If another uncaught exception handler is registered after New Relic starts, this error message is logged:

    The New Relic exception handler has been replaced. 
    This may result in crashes no longer reporting to New Relic.
    

Disable crash reporting

To disable New Relic crash reporting, call the following API method:

Language Procedure
Objective-C

Call prior to [NewRelic startWithApplicationToken:...];

[NewRelic disableFeatures:NRFeatureFlag_CrashReporting];
Swift

Call prior to NewRelic.start(withApplicationToken:)

NewRelic.disableFeatures(NRMAFeatureFlags.NRFeatureFlag_CrashReporting)

For more information about this call, see the NewRelic.h file. For more on applicable feature flags, see the NewRelicFeatureFlags.h file.

For more help

Recommendations for learning more: