How to use Crashlytics with iOS / OS X today view extensions?

前端 未结 5 1541
旧巷少年郎
旧巷少年郎 2020-12-08 10:34

Since today extensions run as separated a process I am sure they will not log any crashes out of the box. I assume we need to initialize Crashlytics on the widget separately

5条回答
  •  广开言路
    2020-12-08 10:55

    Here is official how-to described how to use Crashlytics in iOS Extensions:

    • Add this line to your viewController's initWithCoder method Fabric.with([Crashlytics.self])
    • Copy the "Fabric" Dictionary from your main app's Info.plist and paste into your extension's Info.plist.
    • Copy/paste the Run Script Build Phase from your main app's target into your extension's Run Script Build Phase.

    And... you good to go!

提交回复
热议问题