Crashlytics integration issue

一曲冷凌霜 提交于 2019-12-03 12:49:54

问题


I have trouble integrating Crashlytics into my project.

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.

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.


回答1:


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>

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

in your app delegate:

#import <Crashlytics/Crashlytics.h>

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

[Crashlytics startWithAPIKey:<your api key>];

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




回答2:


Crashlytics collect crashes only when app run NOT in debug mode.

Here is quote from Crashlytics Knowelege Base: 3. Then, make sure that a debugger is not connected. By default, Xcode will launch applications and attach a debugger. This will prevent the crash from reporting -- detach it!

http://support.crashlytics.com/knowledgebase/articles/92522-is-there-a-quick-way-to-force-a-crash-




回答3:


Add Crashlytics framework in your Project and add your Crashlytics key in Build Phase -> Run Script as like in the following image.




回答4:


Follow the advice in the answers above but in addition: IF you installed crashlytics via cocoapods, make sure you are using the proper path in your build phase script.

Use:

./Pods/CrashlyticsFramework/Crashlytics.framework/run myLongKey

Instead Of:

./Crashlytics.framework/run myLongKey



回答5:


For me, there is something wrong with my Crashlytics.app Mac App. So i download one and reinstall it. then it works.



来源:https://stackoverflow.com/questions/17378685/crashlytics-integration-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!