Reputation: 3303
Xcode 8.3.2, Swift 3, Crashlytics 3.8.5 installed
Crashlytics.sharedInstance().recordError(error)
- says "Value of type 'Crashlytics' has no member 'recordError'".
I can't see any recordError function in Crashlytics file as well. But doc says us that it should work.
https://docs.fabric.io/apple/crashlytics/logged-errors.html#logs-and-custom-keys
Upvotes: 3
Views: 1541
Reputation: 39
it has been updated to
Crashlytics.crashlytics().record(error: self)
Upvotes: 0
Reputation: 930
Use this method for earlier Crashlytics versions
import FirebaseCrashlytics
//use following insted of Crashlytics.sharedInstance().recordError(error)
Crashlytics.crashlytics().record(error:)
Upvotes: 2
Reputation: 4815
i have run the code under both version of Crashlytics and its working fine in Xcode 8.3.2, Swift 3,
using pod
use_frameworks!
pod 'Fabric'
pod 'Crashlytics'
Crashlytics :- Version 3.8.4 (121)
code is working fine
Crashlytics.sharedInstance().recordError(error)
Now i had update Crashlytics pod
[Crashlytics] Version 3.8.5 (123))
Build the Project and Run. same code working fine for me.
Upvotes: 4