iOS (Fabric): Crashlytics crashing app on launch

后端 未结 4 449
日久生厌
日久生厌 2021-01-15 04:02

I have updated the Crashlytics but still I am getting this error on launch:

Error: *** Terminating app due to uncaught exception \'FABException\', r

相关标签:
4条回答
  • 2021-01-15 04:34

    Try this:-

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
          Fabric.with([Crashlytics.self])
          return true
        }
    
    0 讨论(0)
  • 2021-01-15 04:50

    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;
    }
    
    0 讨论(0)
  • 2021-01-15 04:51

    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.

    0 讨论(0)
  • 2021-01-15 04:52

    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])
    
    0 讨论(0)
提交回复
热议问题