我尝试使用 symbolicatecrash ~~~.crash 和 dSYM 文件分析 Apple 商店给出的崩溃 iOS 应用程序崩溃日志。但是,当我尝试制作 crash.log 时,出现以下错误。你能告诉我如何解决这个问题吗?
$ ./symbolicatecrash ~~~.crash ~~~.dSYM > crash.log
sh: ”/Applications/Xcode.app/Contents/Developer”/usr/bin/xcrun: No such file or directory
Error: can't find tool named 'otool' in the macosx SDK or any fallback SDKs at ./symbolicatecrash line 115.
以下是符号崩溃文件
#symbolicatecrash
sub getToolPath {
my ($toolName, $sdkGuess) = @_;
if (!defined($sdkGuess)) {
$sdkGuess = "macosx";
}
my $toolPath = `'$DEVELOPER_DIR/usr/bin/xcrun' -sdk $sdkGuess -find $toolName`;
if (!defined($toolPath) || $? != 0) {
if ($sdkGuess eq "macosx") {
die "Error: can't find tool named '$toolName' in the $sdkGuess SDK or any fallback SDKs"; <------ This line is line115
} elsif ($sdkGuess eq "iphoneos") {
print STDERR "## Warning: can't find tool named '$toolName' in iOS SDK, falling back to searching the Mac OS X SDK\n";
return getToolPath($toolName, "macosx");
} else {
print STDERR "## Warning: can't find tool named '$toolName' in the $sdkGuess SDK, falling back to searching the iOS SDK\n";
return getToolPath($toolName, "iphoneos");
}
}
chomp $toolPath;
print STDERR "$toolName path is '$toolPath'\n" if $opt{v};
return $toolPath;
}