我可以将Crashlytics添加到iOS库吗? [英] Can I add Crashlytics to an iOS Library?

查看:75
本文介绍了我可以将Crashlytics添加到iOS库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iOS库中工作,我想添加 Crashlytics ,以便在库崩溃时通知我。我已经集成了 Crashlytics Fabric 框架:我添加了.frameworks软件包,然后添加了Fabric API密钥进入库的info.plist以及将运行脚本阶段进入构建阶段,但是当库在正在运行的应用程序内崩溃时,Fabric仪表板中什么也没有发生。

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. 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.

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

推荐答案

技术上来说,答案似乎是是,但这不是一个好主意。

Looks like the answer is technically "YES", but it would be a bad idea to do so.

迈克·邦纳尔(Mike Bonnell)在另一条帖子中的评论

评论1:


Fabric的Mike。如果您打算将此
框架分发给第三方,请不要在
中包含Fabric或Crashlytics。

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

注释2:


当然,我们的SDK仅支持初始化一次。在框架和应用程序中初始化会导致冲突。您和应用程序开发人员将具有不同的API密钥,并且无法要求应用程序开发人员授予您的SDK许可以与您的框架共享其代码中的堆栈跟踪。将我们包含在您的框架中会给您的框架以及使用它的任何人造成问题,所以这就是为什么我说不包括我们!完全了解SDK开发人员希望看到此支持。

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.

这篇关于我可以将Crashlytics添加到iOS库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆