iOS: '[Fabric] It appears that “Crashlytics” is not a valid Fabric Kit [duplicate]

旧街凉风 提交于 2019-12-25 18:21:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!