问题
I have updated the Crashlytics
but still I am getting this error on launch:
Error: *** Terminating app due to uncaught exception 'FABException', reason: '[Fabric] It appears that "Crashlytics" is not a valid Fabric Kit. Please make sure you only pass Fabric Kits to [Fabric with:].'
Here is my code:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
Fabric.with([Crashlytics.self])
return true
}
回答1:
Please try:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?)
-> Bool
{
// Override point for customization after application launch.
Fabric.with([Crashlytics.class]) // <=========
return true
}
回答2:
use this line of code. after a long try i found this solution xcode7, swift2/3
Fabric.with([Crashlytics()])
i hope it will fix your bug.
来源:https://stackoverflow.com/questions/39719238/ios-fabric-it-appears-that-crashlytics-is-not-a-valid-fabric-kit