Sergnsk
Sergnsk

Reputation: 3303

Crashlytics recordError removed?

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

Answers (4)

flowGlen
flowGlen

Reputation: 687

import Firebase

Crashlytics.crashlytics().record(error: myError)

Upvotes: 0

user2201
user2201

Reputation: 39

it has been updated to

Crashlytics.crashlytics().record(error: self)

Upvotes: 0

Pranit
Pranit

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

MAhipal Singh
MAhipal Singh

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

Related Questions