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

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

问题描述

我有一个iOS应用程序,使用Parse SDK 1.7.0用Xcode 6.2用Swift编写.我已经按照解析快速入门"中的说明设置了崩溃报告(包括AppDelegate中的ParseCrashReporting.enable()),但是看来我的运行脚本有问题.错误是: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.

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". (以前,调试"设置为"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?

也是,这可能是问题吗? export 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发布后,我在ÁrniJónReginsson的答案中找到了修复程序(至少对我自己而言),并做了一些修改.

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.

在解析"文档中,您的运行脚本为:

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天全站免登陆