简体   繁体   English

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

[英]Can I add Crashlytics to an iOS Library?

I am working in an iOS Library and I want to add Crashlytics so I can get notified if the library crashes to any user.我在 iOS 库中工作,我想添加Crashlytics ,以便在库崩溃给任何用户时收到通知。 I have already integrated the Crashlytics and Fabric frameworks: I added the .frameworks bundles, then I added the Fabric API Key into the library's info.plist as well as the run script phase into build phases, but when the library crashes inside a running app, nothing happens in the fabric dashboard.我已经集成了CrashlyticsFabric框架:我添加了 .frameworks 包,然后我将 Fabric API 密钥添加到库的 info.plist 以及运行脚本阶段到构建阶段,但是当库在正在运行的应用程序中崩溃时,结构仪表板中没有任何反应。

Is it possible to add Crashlytics to an iOS Library?是否可以将 Crashlytics 添加到 iOS 库?

Looks like the answer is technically "YES", but it would be a bad idea to do so.看起来答案在技术上是“是”,但这样做是个坏主意。

Mike Bonnell's comments in another post : Mike Bonnell另一篇文章中的评论:

Comment 1:评论1:

Mike from Fabric here.来自 Fabric 的 Mike。 If you're planning on distributing this framework to third parties, do not include Fabric or Crashlytics in it.如果您计划将此框架分发给第三方,请不要在其中包含 Fabric 或 Crashlytics。

Comment 2:评论 2:

Sure, our SDK only supports being initialized once.当然,我们的 SDK 只支持初始化一次。 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.您和应用程序开发人员将拥有不同的 API 密钥,并且无法要求应用程序开发人员授予您的 SDK 与您的框架共享其代码中的堆栈跟踪的权限。 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.完全理解 SDK 开发人员希望看到此支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM