Crashlytics集成问题 [英] Crashlytics integration issue

查看:186
本文介绍了Crashlytics集成问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法将 Crashlytics 整合到我的项目中。

I have trouble integrating Crashlytics into my project.

按照网站上的说明进行操作。但是在安装Crashlytics mac app 之后不久,添加新的构建脚本,粘贴脚本,然后我构建我的项目以继续,然后应用程序崩溃。

Having follow instruction on website. But soon after installing the Crashlytics mac app, add new build script, paste script, then I build my project to continue, then the app crashed.

更新:那时候,我忘了在AppDelegate中初始化一个Crashlytics实例。这完全是我的错,不是服务,也不是客户端应用程序(顺便说一下真的很棒!)。您可以在下面看到答案。

Update: so back then, I forgot to initialize a Crashlytics instance in AppDelegate. It's totally my fault, not the service nor the client app (which is really really awesome by the way!). You can see answers below.

推荐答案

在目标的构建阶段中,单击底部的+添加构建阶段按钮右键并选择Add Run Script。在Crashlytics mac插件中,您应该获得一个运行脚本来复制到此运行脚本构建阶段。它将如下所示:

In the Build Phases of your target, click the + Add a Build Phase button in the bottom right and select Add Run Script. In the Crashlytics mac plugin, you should be given a run script to copy into this run script build phase. It will look like this:

./Crashlytics.framework/run <your api key>

除了你的api密钥将是插件提供的40位数字。

Except your api key will be a 40 digit number provided by the plugin.

#import <Crashlytics/Crashlytics.h>

didFinishLaunchingWithOptions 写下以下行开始你的Crashlytics会话。

In didFinishLaunchingWithOptions write the following line to start your Crashlytics session.

[Crashlytics startWithAPIKey:<your api key>];

< your api key> 是运行脚本中的相同数字。

<your api key> is the same number in the run script.

这篇关于Crashlytics集成问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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