2

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
    }
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Muhammad Umair
  • 583
  • 11
  • 32
  • U get crash log in Crashlytics?? – Monika Patel Sep 27 '16 at 06:00
  • @MonikaPatel No these are device logs.. App crash on launch and if i comment `Fabric.with([Crashlytics.self])`; App works fine. – Muhammad Umair Sep 27 '16 at 06:05
  • Please check my answer, i added in this question http://stackoverflow.com/questions/38825229/fabric-missing-dysm-error-on-multiple-target-objective-c/39543256#39543256 @Muhammad Umair – Monika Patel Sep 27 '16 at 06:09
  • @MonikaPatel I am not using pods and i am getting this error in swift. And I have checked my info.plist file; all the values there in my info.plist file. – Muhammad Umair Sep 27 '16 at 06:11
  • @MonikaPatel any other suggestion or solution? – Muhammad Umair Sep 27 '16 at 06:46
  • Possible duplicate of [iOS: '\[Fabric\] It appears that "Crashlytics" is not a valid Fabric Kit](http://stackoverflow.com/questions/39719238/ios-fabric-it-appears-that-crashlytics-is-not-a-valid-fabric-kit) – spassas Sep 27 '16 at 10:49

4 Answers4

5

I was having a crash on the same line, and it was because I called it BEFORE FirebaseApp.configure().

For anyone having the same issue, make sure you call them in this order:

FirebaseApp.configure()
Fabric.with([Crashlytics.self])
Kqtr
  • 5,824
  • 3
  • 25
  • 32
2

After spending 7 hours, I am able to solve the problem. Problem is: there are 2 Crashlytics files are in my code which are causing this problem. To solve the problem, I have deleted the older file and again integrate the Crashlytics.

Muhammad Umair
  • 583
  • 11
  • 32
0

Try this:-

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
      Fabric.with([Crashlytics.self])
      return true
    }
Vivek Molkar
  • 3,910
  • 1
  • 34
  • 46
vibhor
  • 111
  • 6
0

Try below code snippet, it may help:

For Swift:

//import related frameworks

import Fabric

import Crashlytics

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

    Fabric.with([Crashlytics()])
    //... your initialization code
    return true
}

For Objective-C:

#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
     [Fabric with:@[CrashlyticsKit]];
     //... your initialization code
   return YES;
}
Ronak Chaniyara
  • 5,335
  • 3
  • 24
  • 51