Xcode 尝试符号化iOS崩溃报告时出现奇怪错误

Xcode 尝试符号化iOS崩溃报告时出现奇怪错误,xcode,symbolicatecrash,Xcode,Symbolicatecrash,我从苹果公司收到了一份事故报告,并按照以下说明进行了说明: 不幸的是,我在执行步骤7(“./symbolicatecrash…”)时看到错误,并且没有找到解决这些错误的SO问题: xcodebuild: error: SDK "xxxos" cannot be located. xcrun: error: unable to find utility "otool", not a developer tool or in PATH ## Warning: can't find tool name

我从苹果公司收到了一份事故报告,并按照以下说明进行了说明:

不幸的是,我在执行步骤7(“./symbolicatecrash…”)时看到错误,并且没有找到解决这些错误的SO问题:

xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "otool", not a developer tool or in PATH
## Warning: can't find tool named 'otool' in the xxxos SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "atos", not a developer tool or in PATH
## Warning: can't find tool named 'atos' in the xxxos SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "symbols", not a developer tool or in PATH
## Warning: can't find tool named 'symbols' in the xxxos SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "size", not a developer tool or in PATH
## Warning: can't find tool named 'size' in the xxxos SDK, falling back to searching the iOS SDK
No symbolic information found
注:

  • 我正在运行Xcode 9.2
  • 我还尝试将otool、atos、symbols和size工具从/usr/bin复制到同一个目录中,但仍然出现相同的错误
  • 我可以直接从命令行成功运行所有这些工具
  • 我怀疑问题出在函数“parse_SDKGuess”上,但我真的不能再深入了
知道发生了什么事以及如何解决吗?谢谢

在symbolicatecrash脚本中添加了parse_SDKGuess函数以供参考:

sub parse_SDKGuess {
    my ($log_ref) = @_;

    # It turns out that most SDKs are named "lowercased(HardwareModelWithoutNumbers) + os",
    # so attempt to form a valid SDK name from that. Any code that uses this must NOT rely
    # on this guess being accurate and should fallback to whatever logic makes sense for the situation
    my $model = parse_HardwareModel($log_ref);
    $model or return undef;

    $model =~ /(\D+)\d/;
    $1 or return undef;

    my $sdk = lc($1) . "os";
    if($sdk eq "ipodos" || $sdk eq "ipados") {
        $sdk = "iphoneos";
    }
    if ( $sdk =~ /mac/) {
        $sdk = "macosx";
    }

    return $sdk;
}
似乎“lc($1)”的计算结果为“xxx”…

SDK“xxxos”无法定位 您可能可以忽略这些错误。这些错误的原因是苹果的崩溃报告包含以下内容:

Hardware Model:      xxx1
(而不是例如iPhone10,5)。苹果可能掩盖了硬件模型。他们可能正在使用一种特殊的硬件进行测试

正如警告所示,找不到SDK,它将返回到iOS

没有找到符号信息 我想这与
xxxos
错误无关

对我有效的是从苹果下载dSYMs。转到Xcode>Organizer,在归档选项卡(默认)中选择应用程序和与崩溃报告相对应的版本,然后单击“下载dSYMs…”按钮

下载DSYM后,重新运行
symbolicatecrash
命令:

./symbolicatecrash mycrash.crash > symbolicated.crash
我想问题在于,当您启用位代码时,苹果正在重建应用程序,然后xcarchive中生成的DSYM与崩溃报告不匹配


即使如此,我的代码中的所有调用都正确地进行了符号化,但系统框架(例如UIKit)中的调用没有进行符号化。

您认为“xxxos”是什么?“我从来没听说过。”马特,我在上面的问题中添加了parse_SDKGuess函数。谢谢。如果你知道它在ios上,你能用:
返回“iphoneos”@GradyPlayer谢谢,这让那些错误消失了,但我仍然得到了“没有找到符号信息”,我确信这是一个完全不同的问题,但可能是我得到这些错误的原因…@GradyPlayer“没有找到符号信息”也可能是因为我使用了几个框架,每个框架在dSYMs文件夹中都有一个.dSYM文件。(所有我从未见过的指令都可能有多个DSYM。)我将它们都复制到了同一个文件夹中。还有什么我应该做的吗?非常有用,下载符号使其工作!