Don't mix Crashlytics and New Relic
We recently ran into an issue involving a very difficult crash. The issue was that the crash would only occur when the app had been archived and distributed. When we ran the app from Xcode to try to trace it, it would never occur.
Well, let’s check the Crashlytics trace we thought. Except that it never came. I inserted “Crashlytics.sharedInstance().crash()” in an IBAction to make sure Crashlytics was even reporting. After a several hour delay, we finally had it come through.
Next we checked New Relic. We had one stack trace that didn’t lead us in the right direction. We decided to try dsymbolicating a crash log off of the device. This simply led us to UIViewController.viewDidLoad(). As a last resort, my coworker started placing NSLog statements hoping to leave a trace for ourselves in the log file.
As he got a lead, Crashlytics finally gave us a trace. Both of them arrived at the same conclusion. New Relic was throwing a warning that it couldn’t override the exception handler because other frameworks were trying to do so.
The moral of the story? Don’t use more than one crash reporting framework if you can help it. Essentially, Crashlytics and New Relic were causing issues with each other but finding that out was a huge pain.