Xcode、解析崩溃报告、未创建 dSYM 文件 [英] Xcode, Parse Crash Reporting, dSYM file not created

查看:18
本文介绍了Xcode、解析崩溃报告、未创建 dSYM 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 iOS 应用,使用 Xcode 6.2 用 Swift 编写,使用 Parse SDK 1.7.0.我已经阅读了用于设置崩溃报告的 Parse 快速入门说明(包括 AppDelegate 中的 ParseCrashReporting.enable()),但似乎我的运行脚本有问题.错误是:未找到 App "/Users/ben/Library/Developer/Xcode/DerivedData/MyApp-ahydphsjgdgefbhcdodokcmofehe/Build/Products/Debug-iphonesimulator/MyApp.app.dSYM".命令/bin/sh 失败,退出代码为 1.

I have an iOS app, written in Swift in Xcode 6.2, using the Parse SDK 1.7.0. I've gone through the Parse Quick Start instructions for setting up crash reporting (including ParseCrashReporting.enable() in the AppDelegate), but it seems that my run script is having an issue. The error is: App "/Users/ben/Library/Developer/Xcode/DerivedData/MyApp-ahydphsjgdgefbhcdodokcmofehe/Build/Products/Debug-iphonesimulator/MyApp.app.dSYM" wasn't found. Command /bin/sh failed with exit code 1.

由此看来,Xcode 似乎没有创建 dSYM 文件.在我的构建设置 > 构建选项中,我已将调试和发布的调试信息格式更改为带有 dSYM 文件的 DWARF".(之前,Debug 设置为DWARF")

According to this, it seems that Xcode is not creating the dSYM file. In my Build Settings > Build Options I have changed Debug Information Format to "DWARF with dSYM file" for both Debug and Release. (Previously, Debug was set to "DWARF")

我应该更改构建选项中的其他内容吗?

Should I change anything else in the Build Options?

另外,这可能是问题吗?导出 DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT=NO

Also, could this be the issue? export DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT=NO

这是我的运行脚本:

export PATH=/usr/local/bin:$PATH
cd $PROJECT_DIR/parse

parse symbols "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

预先感谢您提供有关如何解决此问题的任何想法.

Thank you in advance for any ideas about how to fix this.

感谢@udjat 的回答,我能够运行我的应用程序并运行脚本(如下)而不会导致应用程序崩溃.多亏了 Parse 的一些错误修复,测试崩溃报告现在也可以运行了,尽管仍然有明显的延迟.

Thanks to the answer from @udjat, I was able to run my app and run script (below) without the app crashing. And thanks to some bug fixes from Parse, the test crash reports are functioning now as well, though there is still a significant delay.

新的运行脚本:

echo "Parse Crash Reporting"
export PATH=/usr/local/bin:$PATH
CLOUD_CODE_DIR=${PROJECT_DIR}/parse

if [ -d ${CLOUD_CODE_DIR} ]; then
cd ${CLOUD_CODE_DIR}
parse symbols MyApp --path="${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
echo "Finished uploading symbol"
else
echo "Unable to upload symbols"
fi

AppDelegate 中的崩溃测试:

Crash test in AppDelegate:

func crash() {
    NSException(name:NSGenericException, reason:"Everything is ok. This is just a test crash.", userInfo:nil).raise()
}

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {

    ParseCrashReporting.enable()

    dispatch_after(
        dispatch_time(DISPATCH_TIME_NOW, Int64(5.0 * Double(NSEC_PER_SEC))),
        dispatch_get_main_queue(),
        { () -> Void in
            self.crash()
    });
}

推荐答案

阅读完 Facebook 链接后@jairobjunior发布后,我在 Árni Jón Reginsson 的回答中找到了修复(至少对我自己而言)并稍作修改.

After reading through the Facebook link @jairobjunior posted, I found the fix (at least for myself) in Árni Jón Reginsson's answer and modified a bit.

在 Parse 文档中,你的运行脚本是:

In the Parse document, your run script is:

export PATH=/usr/local/bin:$PATH
cd YOUR_PATH
parse symbols "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

改为:

echo "Parse Crash Reporting"
export PATH=/usr/local/bin:$PATH
CLOUD_CODE_DIR=${PROJECT_DIR}/ParseCloudCode(or wherever yours is)

if [ -d ${CLOUD_CODE_DIR} ]; then
    cd ${CLOUD_CODE_DIR}
    parse symbols YOUR_PARSE_APP_NAME --path="${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
    echo "Finished uploading symbol"
else
    echo "Unable to upload symbols"
fi

您的崩溃报告显示在 Parse 上所需的时间远不止最多一分钟"(我用了超过 15 分钟).如果它上传完成,它就会在那里,你只需要耐心等待.

And it takes a lot more than "up to one minute" for your crash reports to show up on Parse (took me more than 15 minutes). If it finished uploading, it will be there, you just need to be patient.

这篇关于Xcode、解析崩溃报告、未创建 dSYM 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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