All I can find is Is there a quick way to force a crash? which says to:
[[Crashlytics sharedInstance] crash];
which I think in Swift would be
Crashlytics.sharedInstance.crash()
but this does not seem to exist. (perhaps the docs are out of date and no longer apply since Fabric gobbled up Crashlytics?)
I see that there is a Crashlytics.crash(self:Crashlytics) …nevermind, friggin XCode's completion is always broken for me. See answer below.
Best Solution
If you are using the new Firebase Crashlytics SDK note that
import Crashlytics
has been replaced byimport FirebaseCrashlytics
. Thecrash()
method is no longer available in the new SDK. As recommended by Firebase, simply use:Swift:
Obj C: