Crashlytics未在发布模式下报告崩溃 [英] Crashlytics not reporting crash in Release mode

查看:120
本文介绍了Crashlytics未在发布模式下报告崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Crashlytics已经在相关应用程序中安装了几个版本。它一直很好用。

Crashlytics has been installed in the app in question for a couple of releases now. It's been working great.

但是在我们准备下一个版本时,Crashlytics已经停止在发布模式下报告崩溃。以下是我能想到的自上次发布以来发生过变化的事情。

But as we prepare the next release Crashlytics has stopped reporting crashes in Release mode. Here are the things I can think of that have changed since our last release.


  • Xcode 7.1。最后一个版本是使用Xcode 6编写的。

  • 我们已升级到Fabric。

  • 我们正在测试iOS 9.1上的应用程序。

无论如何,在所有这些更改中,仍然会在Debug中报告崩溃。只是没有发布(在归档并上传到iTunes Connect后从TestFlight安装)。

Anyway, with all those changes crashes are still being reported just fine in Debug. Just not in Release (installing from TestFlight after archiving and uploading to iTunes Connect).

以下是我检查的内容:


  • 在Fabric网站上,应用程序就在那里,版本和版本都在那里。当我点击Missing DSYMs时,它告诉我没有丢失。

  • On the Fabric site the app is there, the version and build are there. When I click on Missing DSYMs it tells me there are none missing.

startWithAPIKey 正在 didFinishLaunchingWithOptions 中调用(在trojanfoe的问题之后添加)。

startWithAPIKey is being called in didFinishLaunchingWithOptions (added after trojanfoe's question).

api密钥是正确的。检查并仔细检查。

The api key is correct. Checked and double-checked.

在构建脚本中,Debug和Release之间没有(也从未有过)区别。它看起来像这样:

In the build script there isn't (and never was) a distinction between Debug and Release. It looks like this:


  • 在构建设置 DEBUG_INFORMATION_FORMAT 已设置为 DWARF与dSYM文件(在StormXX的问题之后添加):

  • In Build Settings DEBUG_INFORMATION_FORMAT is already set to DWARF with dSYM File (added after StormXX's question):

我缺少什么?

推荐答案

Mike来自Crashlytics and Fabric。

Mike from Crashlytics and Fabric here.

使用Fabric,Crashlytics的初始化确实略有改变。使用以下代码应该有效(Obj-C):

With Fabric, the initialization of Crashlytics did change slightly. Using the following code should work (Obj-C):

#import "AppDelegate.h"
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>

@interface AppDelegate ()

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    [Crashlytics startWithAPIKey:@"YourAPIKey"];
    // You can comment out the above line if you have your Twitter Fabric API key in your info.plist.
    [Fabric with:@[[Crashlytics class]]];
    return YES;
}

还建议将运行脚本构建阶段更新为以下内容:

Updating the run script build phase to the following is also recommended:

./Fabric.framework/run <YourAPIKey> <YourBuildSecret> 

这篇关于Crashlytics未在发布模式下报告崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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