How to use Crashlytics with iMessage Extensions?

前端 未结 1 1553
孤城傲影
孤城傲影 2021-01-14 03:36

I have an iMessage extension within my iOS app. Can Crashlytics capture its crashes?

I\'ve tried adding the same Fabric entry from my main app\'s

1条回答
  •  南笙
    南笙 (楼主)
    2021-01-14 03:46

    Mike from Fabric here.

    We have experimental support for only Crashlytics on iMessage Extensions. To get things working:

    1. Add your Fabric Run Script Build Phase to your extension's target. Copy and paste the one in your main app.
    2. Add the Fabric and Crashlytics.framework to your extension's linked libraries
    3. Add the Crashlytics.startWithAPIKey("YourActualApiKey") to your extension's view controller's initWithCodermethod. If you don't have an initWithCoder method currently, it should look like this in the end:

      required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) Crashlytics.startWithAPIKey("yourApiKey") }

    Reference: https://stackoverflow.com/a/27153383/3975963

    0 讨论(0)
提交回复
热议问题