Tomáš Kohout
Tomáš Kohout

Reputation: 785

Non-fatal errors not showing in Crashlytics

I was testing the non-fatal error functionality of Crashlytics and can't seem to get the recorded errors to appear in Crashlytics.

I did initialize Crashlytics in AppDelegate like this:

Fabric.with([Crashlytics.self])

And I test send error like this (the test code is in viewDidLoad method):

let error = NSError(domain: "myDomain", code: 1000, userInfo: nil)
Crashlytics.sharedInstance().recordError(error)

But nothing shows up in the analytics. I tried to:

enter image description here

Versions:

Thanks

Upvotes: 4

Views: 3724

Answers (3)

Pravin S.
Pravin S.

Reputation: 485

Please check if you uploaded DSYM file with your build.

Upvotes: 1

Łukasz Gierałtowski
Łukasz Gierałtowski

Reputation: 607

Run the script which uploads DSYMS to Firebase. Typically this script is not executed in debug mode - check the Build Phases tab. If you use such configuration just try in AdHoc build.

Upvotes: 1

Tomáš Kohout
Tomáš Kohout

Reputation: 785

I found what was the problem:

The application code was embedded in a framework. My tip is that the non-fatal logs were saved in the framework's bundle not the main bundle. On the next start the main bundle was searched for logs but none was found, thus nothing was sent.

My solution was remove the app from framework as it was no longer needed in the project. I am not sure how this would be solved if you would need to keep the code in the framework.

Upvotes: 1

Related Questions