3

I'm trying to add Firebase to collect analytics events and crashes to iOS Share Extension. Everything works perfect in main app but not in Share Extension. I managed to find this way of initialization:

override func viewDidLoad() {
    super.viewDidLoad()
    if FirebaseApp.app() == nil {
        FirebaseApp.configure()
    }
    // other code
}

Analytics.logEvent works perfectly, I can see events in firebase console, but crashes are not collected.

In addition, xcode organizer periodically collects the following crashes:

enter image description here

Who can tell what could be the reason and what to do to make Crashlytics collect crashes?

Aleksey Khokhrin
  • 166
  • 2
  • 13

1 Answers1

0

I managed to do it by adding this:

if FirebaseApp.app() == nil {
    FirebaseApp.configure()
    Fabric.with([Crashlytics.self])
}
Aleksey Khokhrin
  • 166
  • 2
  • 13