Reputation: 785
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:
Crashlytics.sharedInstance().crash()
. In that case only the fatal crash is reported Versions:
Thanks
Upvotes: 4
Views: 3724
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
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