Search code examples
iosswiftfirebaseswift4firebase-crash-reporting

Swift Crashlytics without cocoapods and fabric API Key not showing dashboard or any data


I have implemented firebase Crashlytics in my swift projects without cocoapods. I have done the following task so far. But still, not getting anything on the dashboard.

  1. Created project in firebase console. Downloaded the plist file and added to project.
  2. Added the firebase library all with Firebase.h header file. Then added the header with an Obj-c bridge header file from settings. Also fabric and Crashlytics library.
  3. Added the run script.
  4. In appdelegate, didFinishLaunchingWithOptions() , added these 3 lines.

    FirebaseApp.configure()
    Fabric.sharedSDK().debug = true
    Fabric.with([Crashlytics.self])
    
  5. In a viewcontroller, added the following line, run on the simulator, make a crash, relaunch the apps. So that I can expect it to upload on the dashboard. Nothing found in the log, just see firebase enabled. Crashlytics version ...

    Crashlytics.sharedInstance().crash()
    
  6. From project settings i set , Debug Inforation Format : DWARF with dSYM File

But I see nothing on the dashboard. I don't use any API key in my Plist, I just using the plist in my project. What could be my problem?

enter image description here

enter image description here

enter image description here


Solution

  • I think I know what the issue is. You're probably running in the Simulator with the debugger attached.

    Crashlytics can’t capture crashes if your build attaches a debugger at launch.

    Docs for forcing a crash: https://firebase.google.com/docs/crashlytics/force-a-crash

    To fix this, go to your app in the Simulator w/o the debugger attached and reproduce your crash. You should see your crash in the Firebase console.