我可以将 Crashlytics 添加到 iOS 库吗?

Can I add Crashlytics to an iOS Library?

我在 iOS 图书馆工作,我想添加 Crashlytics,这样我可以在图书馆崩溃时收到任何用户的通知。我已经集成了 CrashlyticsFabric 框架:我添加了 .frameworks 包,然后我将 Fabric API Key 添加到库的 info.plist 以及 运行 脚本阶段进入构建阶段,但是当库在 运行ning 应用程序中崩溃时,结构仪表板中没有任何反应。

是否可以将 Crashlytics 添加到 iOS 库中?

看起来从技术上讲答案是 "YES",但这样做并不是一个好主意。

Mike Bonnell's comments in another post:

评论 1:

Mike from Fabric here. If you're planning on distributing this framework to third parties, do not include Fabric or Crashlytics in it.

评论 2:

Sure, our SDK only supports being initialized once. Being initialized in a framework and application would cause a conflict. You and the app developer would have different API keys and there is no way to ask the app developer to give permission to your SDK to share stack traces from their code with your framework. Including us in your framework will cause issues for your framework and anyone that uses it, so that's why I said don't include us! Totally understand that SDK developers would love to see this supported.