有崩溃报告、dsym 文件但没有 ipa/xarchive:如何符号化崩溃日志?

Have crash report, dsym file but not the ipa / xarchive: How to symbolicate the crash log?

我昨天完成了 TestFlight 构建并从一个 Mac 切换到另一个位置。

今天我看到,崩溃管理器中有崩溃,但没有符号化。

我下载了 TestFlight 中构建的 dSym 文件,我有该构建的源代码(自昨天以来已经应用了一些修复,但是 class 和行仍然非常有用) - 但我这里的办公室没有 Mac 的实际构建。

如何将符号应用到崩溃日志?

更新:我尝试直接调用 symbolicatecrash,但在路径中无法访问。我不得不用完整的路径集来调用它

imac:Contents thst$ pwd
/Applications/Xcode.app/Contents
imac:Contents thst$ ./SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash ...

然后它抱怨DEVELOPER_DIR没有设置,所以我设置为

export DEVELOPER_DIR=`xcode-select -p`

这至少让它开始了,但现在我得到这样的错误:

xcodebuild: error: SDK "ipados" 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 ipados SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "ipados" 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 ipados SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "ipados" cannot be located.
xcrun: error: unable to find utility "lipo", not a developer tool or in PATH
## Warning: can't find tool named 'lipo' in the ipados SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "ipados" 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 ipados SDK, falling back to searching the iOS SDK
## Warning: Unable to symbolicate from required binary: /Users/thst/Library/Developer/Xcode/iOS DeviceSupport/8.4 (12H143)/Symbols/System/Library/Frameworks/CoreMotion.framework/CoreMotion
Incident Identifier: B2F71703-1CE2-4CDE-A6A8-3C51FDE9DBFF
Beta Identifier:     DD46FE78-8872-4DF1-BF83-58796766B994
Hardware Model:      iPad2,2

在命令行上调用 otool 有效:

imac:Contents thst$ otool
Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool [-arch arch_type] [-fahlLDtdorSTMRIHGvVcXmqQjCP] [-mcpu=arg] [--version] <object file> ...
    -f print the fat headers
    -a print the archive header
    ...

所以它实际上在路上。

您不需要 IAP 文件,只需要崩溃文件和 dsym 文件。在终端中使用以下命令:

./symbolicatecrash crashFile.crash dsymFile.dSYM > crashLog.txt

我遇到了同样的问题,请确保 Xcode 应用程序名称与 DEVELOPER_DIR 的名称相同。 例如:我在应用程序中将我的 xcode 应用程序命名为 xcode 7.2。但是我设置了

$DEVELOPER_DIR='/Applications/Xcode.app/Contents/Developer';在符号崩溃中。

问题在我如下设置后得到解决

$DEVELOPER_DIR='/Applications/Xcode 7.2.app/Contents/Developer';