符号化 iPhone 应用程序崩溃报告
我想尝试用符号表示我的 iPhone 应用程序的崩溃报告。
我从 iTunes Connect 检索了崩溃报告。我有提交到 App Store 的应用程序二进制文件,还有作为构建的一部分生成的 dSYM 文件。
我将所有这些文件放在一个由聚光灯索引的目录中。
现在怎么办?
我尝试过调用:
symbolicatecrash crashreport.crash myApp.app.dSYM
它只输出与崩溃报告中相同的文本,而不是符号化的。
我做错了什么吗?
I'm looking to try and symbolicate my iPhone app's crash reports.
I retrieved the crash reports from iTunes Connect. I have the application binary that I submitted to the App Store and I have the dSYM file that was generated as part of the build.
I have all of these files together inside a single directory that is indexed by spotlight.
What now?
I have tried invoking:
symbolicatecrash crashreport.crash myApp.app.dSYM
and it just outputs the same text that is in the crash report to start with, not symbolicated.
Am I doing something wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(26)
分析苹果崩溃报告的步骤:
将推送到应用商店的 .app 版本文件、发布时创建的 .dSYM 文件以及从 APPLE 收到的崩溃报告复制到文件夹< /em>.
打开终端应用程序并转到上面创建的文件夹(使用
cd
命令)运行atos -arch armv7 -o APPNAME.app/APPNAME MEMORY_LOCATION_OF_CRASH。根据报告,内存位置应该是应用程序崩溃的位置。
例如:atos -arch armv7 -o 'APPNAME.app'/'APPNAME' 0x0003b508
这将显示导致崩溃的确切行、方法名称。
例如:<代码>[类名函数名:]; -510
符号化 IPA
如果我们使用 IPA 进行符号化 - 只需将扩展名 .ipa 重命名为 .zip ,然后解压它,我们就可以得到一个包含 app 的 Payload 文件夹。在这种情况下,我们不需要 .dSYM 文件。
注意
仅当应用程序二进制文件未删除符号时,此功能才有效。默认情况下,发布版本会删除这些符号。我们可以在项目构建设置中将其“在复制期间剥离调试符号”更改为“否”。
更多详细信息请参阅此帖子
Steps to analyze crash report from apple:
Copy the release .app file which was pushed to the appstore, the .dSYM file that was created at the time of release and the crash report receive from APPLE into a FOLDER.
OPEN terminal application and go to the folder created above (using
cd
command)Run
atos -arch armv7 -o APPNAME.app/APPNAME MEMORY_LOCATION_OF_CRASH
. The memory location should be the one at which the app crashed as per the report.Ex:
atos -arch armv7 -o 'APPNAME.app'/'APPNAME' 0x0003b508
This would show you the exact line, method name which resulted in crash.
Ex:
[classname functionName:]; -510
Symbolicating IPA
if we use IPA for symbolicating - just rename the extention .ipa with .zip , extract it then we can get a Payload Folder which contain app. In this case we don't need .dSYM file.
Note
This can only work if the app binary does not have symbols stripped. By default release builds stripped the symbols. We can change it in project build settings "Strip Debug Symbols During Copy" to NO.
More details see this post
在阅读了此处所有这些答案以符号化崩溃日志(并最终成功)后,我认为这里缺少一些点,这些点对于确定为什么调用 symbolicatecrash 不会产生符号化输出非常重要。
表示崩溃日志时,必须将 3 个资源组合在一起:
example.crash
),可以从 Xcode 的管理器导出,也可以从 iTunes Connect 接收。.app
包(即example.app
)本身包含属于崩溃日志的应用程序二进制文件。如果您有.ipa
包(即example.ipa
),那么您可以通过解压.ipa 来提取
包(即.app
包unzip example.ipa
)。之后,.app
包位于提取的Payload/
文件夹中。.dSYM
包(即example.app.dSYM
)在开始符号化之前,您应该检查所有这些工件是否匹配,这意味着崩溃日志属于您拥有的二进制文件以及调试符号是在该二进制文件的构建过程中生成的。
每个二进制文件都由可在崩溃日志文件中看到的 UUID 引用:
在此提取中,崩溃日志属于名为 example.app/example 且 UUID
aa5e633efda8346cab92b01320043dc3
的应用程序二进制映像。您可以使用 dwarfdump 检查二进制包的 UUID:
然后您应该检查您拥有的调试符号是否也属于该二进制文件:
在此示例中,所有资产都组合在一起,您应该能够对堆栈跟踪进行符号化。
继续执行
symbolicatecrash
脚本:在 Xcode 8.3 中,您应该能够通过以下方式调用该脚本:
如果不存在,您可以运行
find 。 -name symbolicatecrash
在你的 Xcode.app 目录中找到它。正如您所看到的,没有给出更多参数。因此,脚本必须通过运行聚光灯搜索来查找应用程序二进制文件和调试符号。它使用名为
com_apple_xcode_dsym_uuids
的特定索引搜索调试符号。您可以自己进行此搜索:resp。
第一个聚光灯调用为您提供所有索引的 dSYM 包,第二个调用为您提供具有特定 UUID 的
.dSYM
包。如果聚光灯找不到您的.dSYM
包,那么symbolicatecrash
也不会。如果您执行所有这些操作,例如在~/Desktop
聚光灯的子文件夹中应该能够找到所有内容。如果
symbolicatecrash
找到您的.dSYM
包,symbolicate.log
中应该有类似以下内容的行:For find your
.app< /code> 打包一个聚光灯搜索,如下所示,由
symbolicatecrash
调用:如果
symbolicatecrash
找到您的.app
包,则应该有以下摘录symbolicate.log
:如果
symbolicatecrash
找到了所有这些资源,它应该打印出崩溃日志的符号版本。如果没有,您可以直接传入 dSYM 和 .app 文件。
注意:符号化回溯将输出到终端,而不是
symbolicate.log
。After reading all these answers here in order to symbolicate a crash log (and finally succeeding) I think there are some points missing here that are really important in order to determine why the invocation of symbolicatecrash does not produce a symbolicated output.
There are 3 assets that have to fit together when symbolicating a crash log:
example.crash
), either exported from XCode's organizer or received from iTunes Connect..app
package (i.e.example.app
) that itself contains the app binary belonging to the crash log. If you have an.ipa
package (i.e.example.ipa
) then you can extract the.app
package by unzipping the.ipa
package (i.e.unzip example.ipa
). Afterwards the.app
package resides in the extractedPayload/
folder..dSYM
package containing the debug symbols (i.e.example.app.dSYM
)Before starting symbolication you should check if all those artifacts match, which means that the crash log belongs to the binary you have and that the debug symbols are the ones produced during the build of that binary.
Each binary is referred by a UUID that can be seen in the crash log file:
In this extract the crash log belongs to an app binary image named example.app/example with UUID
aa5e633efda8346cab92b01320043dc3
.You can check the UUID of the binary package you have with dwarfdump:
Afterwards you should check if the debug symbols you have also belong to that binary:
In this example all assets fit together and you should be able to symbolicate your stacktrace.
Proceeding to the
symbolicatecrash
script:In Xcode 8.3 you should be able to invoke the script via
If it is not there you may run a
find . -name symbolicatecrash
in your Xcode.app directory to find it.As you can see there are no more parameters given. So the script has to find your application binary and debug symbols by running a spotlight search. It searches the debug symbols with a specific index called
com_apple_xcode_dsym_uuids
. You can do this search yourself:resp.
The first spotlight invocation gives you all indexed dSYM packages and the second one gives you the
.dSYM
packages with a specific UUID. If spotlight does not find your.dSYM
package thensymbolicatecrash
will neither. If you do all this stuff e.g. in a subfolder of your~/Desktop
spotlight should be able to find everything.If
symbolicatecrash
finds your.dSYM
package there should be a line like the following insymbolicate.log
:For finding your
.app
package a spotlight search like the following is invoked bysymbolicatecrash
:If
symbolicatecrash
finds your.app
package there should be the following extract insymbolicate.log
:If all those resources are found by
symbolicatecrash
it should print out the symbolicated version of your crash log.If not you can pass in your dSYM and .app files directly.
Note: The symbolicated backtrace will be output to terminal, not
symbolicate.log
.使用最新版本的 Xcode (3.2.2),您可以将任何崩溃报告拖放到 Xcode Organizer 的设备日志部分,它们将自动为您进行符号化。我认为如果您使用 Build & 构建该版本的应用程序,效果最好。存档(也是 Xcode 3.2.2 的一部分)
With the latest version of Xcode (3.2.2), you can drag and drop any crash reports into the Device Logs section of the Xcode Organiser and they will automatically by symbolicated for you. I think this works best if you built that version of the App using Build & Archive (also part of Xcode 3.2.2)
我使用以下步骤成功完成了此操作。
第1步:在桌面上创建一个文件夹,我将其命名为“CrashReport”并放入三个文件(“MYApp.app”、“MyApp.app.dSYM”、“MYApp_2013-07-18.dSYM”)。崩溃”)。
第 2 步: 打开 Finder 并转到“应用程序”,您将在其中找到 Xcode 应用程序,右键单击该应用程序并单击“显示包内容”,然后按照此简单路径操作。
“内容->开发者->平台->iPhoneOS.platform->开发者->库->PrivateFrameworks->DTDeviceKit.framework->版本->A- >资源”
或
“内容->开发者->平台->iPhoneOS.platform->开发者->库->PrivateFrameworks->DTDeviceKitBase.framework->版本->A->Resources"
或者
对于 Xcode 6 及以上版本,路径为
Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources
在您找到“symbolicatecrash”文件的位置,将其复制并粘贴到“CrashReport”文件夹中。
第 3 步:启动终端,运行以下 3 个命令
cd /Users/mac38/Desktop/CrashReport 并按 Enter 按钮
导出 DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer" 并按 Enter
I did this successfully, using the following steps.
Step 1: Create a folder in desktop, I give name it to "CrashReport" and put three files ("MYApp.app", "MyApp.app.dSYM", "MYApp_2013-07-18.crash") in it.
Step 2: Open Finder and go to Applications, where you will find the Xcode application, right click on this and Click "Show Package Contents", after this follow this simple path.
"Contents->Developer->Platforms->iPhoneOS.platform->Developer->Library->PrivateFrameworks->DTDeviceKit.framework->Versions->A->Resources"
OR
"Contents->Developer->Platforms->iPhoneOS.platform->Developer->Library->PrivateFrameworks->DTDeviceKitBase.framework->Versions->A->Resources"
OR
For Xcode 6 and above the path is
Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources
Where you find "symbolicatecrash" file, copy this and paste it to "CrashReport" folder.
Step 3: launch the terminal, run these 3 Command
cd /Users/mac38/Desktop/CrashReport and press Enter button
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer" and press Enter
使用 XCode 自动符号化崩溃报告的步骤:
已更新 XCODE 9
将任何 iOS 设备连接到您的 Mac(是的,物理设备) ,是的,我知道这很愚蠢)
选择“窗口”菜单中的“设备”
在左侧单击您的设备,然后在右侧查看设备日志
等等。可能需要一分钟才会出现。也许执行
Command-A
然后Delete
会加快速度。未记录的关键步骤:将从 iTunesConnect 获得的崩溃报告从
.txt
扩展名重命名为.crash
扩展名将崩溃报告拖到左侧的区域
然后 Xcode 会符号化崩溃报告并显示结果。
来源:https://developer.apple.com/library/ios/technotes /tn2151/_index.html
Steps to symbolicate a crash report automatically using XCode:
UPDATED FOR XCODE 9
Connect any iOS device to your Mac (yes a physical one, yes I know this is stupid)
Choose "Devices" from the "Window" menu
Click your device on the left and VIEW DEVICE LOGS on the right
Wait. It might take a minute to show up. Maybe doing
Command-A
thenDelete
will speed this up.Critical undocumented step: rename the crash report that you got from iTunesConnect from
.txt
extension to.crash
extensionDrag the crash report into that area on the left
And then Xcode will symbolicate the crash report and display the results.
Source: https://developer.apple.com/library/ios/technotes/tn2151/_index.html
我在我的应用程序中使用 Airbrake,它在远程错误记录方面做得相当好。
如果回溯需要的话,我是这样用 atos 来符号化它们的:
在 Xcode (4.2) 中转到组织器,右键单击来自的存档
生成了 .ipa 文件。
在终端中,cd 进入 xcarchive 例如
MyCoolApp 10-27-11 1.30 PM.xcarchive
输入以下
atos -arch armv7 -o 'MyCoolApp.app'/'MyCoolApp'
(不要忘记单引号)
我没有在该调用中包含我的符号。您得到的是空行上的块光标。
然后我将符号代码复制/粘贴到该块光标处并按
进入。您会看到类似以下内容:
-[MyCoolVC dealloc](在 MyCoolApp 中)(MyCoolVC.m:34)
您返回到块光标,可以粘贴其他符号。
能够在不重新输入第一位的情况下遍历回溯一个项目,可以节省大量时间。
享受!
I use Airbrake in my apps, which does a fairly good job of remote error logging.
Here's how I symbolicate them with atos if the backtrace needs it:
In Xcode (4.2) go to the organizer, right click on the archive from
which the .ipa file was generated.
In Terminal, cd into the xcarchive for instance
MyCoolApp 10-27-11 1.30 PM.xcarchive
Enter the following
atos -arch armv7 -o 'MyCoolApp.app'/'MyCoolApp'
(don't forget the single quotes)
I don't include my symbol in that call. What you get is a block cursor on an empty line.
Then I copy/paste my symbol code at that block cursor and press
enter. You'll see something like:
-[MyCoolVC dealloc] (in MyCoolApp) (MyCoolVC.m:34)
You're back to a block cursor and you can paste in other symbols.
Being able to go through your backtrace one item without re-entering the first bit is a nice time saver.
Enjoy!
在运行 symbolicate crash 之前,我还将 dsym、应用程序包和崩溃日志放在同一目录中。
然后,我使用 .profile 中定义的这个函数来简化运行 symbolicatecrash:
那里添加的参数可能会对您有所帮助。
您可以通过运行以下命令来检查以确保聚光灯“看到”您的 Dym 文件:
查找目录中的 dsym。
注意:从最新的 Xcode 开始,不再有 Developer 目录。您可以在这里找到此实用程序:
/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Vers ions/A/Resources/symbolicatecrash
I also put dsym, app bundle, and crash log together in the same directory before running symbolicate crash
Then I use this function defined in my .profile to simplify running symbolicatecrash:
The arguments added there may help you.
You can check to make sure spotlight "sees" your dysm files by running the command:
Look for the dsym you have in your directory.
NOTE: As of the latest Xcode, there is no longer a Developer directory. You can find this utility here:
/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash
只是 xcode 6.1.1 的简单且更新的答案。
步骤
1.Xcode>窗口>设备。
2.从“设备”部分下的设备列表中选择一个设备。
3.选择查看设备日志。
4.在“所有日志”部分下,您可以直接拖放报告。崩溃
5.Xcode 将自动为您符号化崩溃报告。
6.您可以通过将其日期/时间与崩溃报告中提到的日期/时间进行匹配来找到符号化的崩溃报告。
Just a simple and updated answer for xcode 6.1.1 .
STEPS
1.Xcode>Window>Devices.
2.Select a device from a list of devices under DEVICES section.
3.Select View Device Logs.
4.Under the All Logs section you can directly drag drop the report.crash
5.Xcode will automatically Symbolicate the crash report for you.
6.You can find the Symbolicated crash report by matching its Date/Time with the Date/Time mentioned in your crash report.
尽管我已经开发应用程序几年了,但这是我第一次调试二进制文件,我感觉自己像个菜鸟一样弄清楚所有文件在哪里,即 *.app *.dSYM 和崩溃日志在哪里?我必须阅读多篇文章才能弄清楚。图片胜过一千字,我希望这篇文章对未来的其他人有所帮助。
1- 首先转到 itunesconnect 并下载崩溃日志。
注意:在大多数情况下,您可能会收到类似“提交的报告太少,无法显示报告”的信息。基本上没有足够的用户向 Apple 提交了崩溃日志报告,在这种情况下,您此时无能为力。
2- 现在,如果您在将二进制文件提交给 Apple 后没有更改过代码,则为该项目启动 Xcode 并执行 Product -->;再次存档。否则,只需找到您最新提交的二进制文件并右键单击它即可。
Even though I had been developing apps for a few years now, this was my first time debugging a binary and I felt like a complete NOOB figuring out where all the files were i.e. where is *.app *.dSYM and crash logs? I had to read multiple posts in order to figure it out. Picture is worth a thousand words and I hope this post helps anyone else in future.
1- First go to itunesconnect and download your crash logs.
NOTE: Is most cases you may get something like "Too few reports have been submitted for a report to be shown." Basically not enough users have submitted crash log reports to Apple in which case you can't do much of anything at that point.
2- Now if you had not changed your code since you had submitted your binary it to Apple then Launch Xcode for that project and do Product --> Archive again. Otherwise just find your latest submitted binary and right click on it.
在 Xcode 4.2.1 中,打开管理器,然后转到库/设备日志并将 .crash 文件拖到崩溃日志列表中。几秒钟后,它将为您显示符号。
请注意,您必须使用原始构建存档所在的 Xcode 实例(即构建的存档必须存在于 Organizer 中)。
In Xcode 4.2.1, open Organizer, then go to Library/Device Logs and drag your .crash file into the list of crash logs. It will be symbolicated for you after a few seconds.
Note that you must use the same instance of Xcode that the original build was archived on (i.e. the archive for your build must exist in Organizer).
使用 Xcode 4,任务甚至更简单:
瞧。日志文件会自动为您导入并符号化。假设您使用 Xcode 存档了构建 ->产品->首先存档。
Using Xcode 4, the task is even simpler:
and voilà. The log file is imported and Symbolized automatically for you. Provided you Archived the build using Xcode -> Product -> Archive first.
神奇的 Xcode Organizer 对于象征我的应用程序来说并没有那么神奇。对于我从 Apple 收到的因应用程序提交失败而返回的崩溃报告,我根本没有收到任何符号。
我尝试使用命令行,将崩溃报告放在与 .app 文件(我提交到商店)和 .dSYM 文件相同的文件夹中:
这仅为我的应用程序提供了符号,而不是核心基础代码,但是它比组织者给我的数字转储要好,足以让我找到并修复我的应用程序发生的崩溃。如果有人知道如何扩展它以获得基金会符号,我们将不胜感激。
The magical Xcode Organizer isn't that magical about symbolicating my app. I got no symbols at all for the crash reports that I got back from Apple from a failed app submission.
I tried using the command-line, putting the crash report in the same folder as the .app file (that I submitted to the store) and the .dSYM file:
This only provided symbols for my app and not the core foundation code, but it was better than the number dump that Organizer is giving me and was enough for me to find and fix the crash that my app had. If anyone knows how to extend this to get Foundation symbols it would be appreciated.
就我而言,我将崩溃报告直接从邮件拖到组织者中。由于某种原因,这阻止了崩溃报告被符号化(我很想知道为什么)。
首先将崩溃报告复制到桌面,然后将它们从那里拖到管理器中,使它们正确地符号化。
非常具体的案例,我知道。但我想我会分享以防万一。
In my case, I was dragging crash reports directly from Mail to the Organizer. For some reason, that prevented the crash reports from getting symbolicated (I'd love to know why).
Copying the crash reports to the Desktop first, and then dragging them from there to the Organizer got them symbolicated properly.
Very specific case, I know. But thought I'd share just in case.
这是我在使用symbolicatecrash时遇到的另一个问题——它不适用于捆绑包中有空格的应用程序(即“Test App.app”)。请注意,我认为提交时名称中不能包含空格,因此您应该删除这些空格,但如果您已经有需要分析的崩溃,请修补 symbolicatecrash (4.3 GM),如下所示:
Here's another issue I have with symbolicatecrash – it won't work with Apps that have spaces in their bundle (i.e. 'Test App.app'). Note I don't think you can have spaces in their name when submitting so you should remove these anyway, but if you already have crashes that need analysing, patch symbolicatecrash (4.3 GM) as such:
对于那些使用 Airbrake 的人来说,上面有一个可靠的响应,但如果不进行调整,它对我不起作用:
适用于某些内存地址,但不适用于其他内存地址,不知道为什么...
仅获取一个地址的信息
For those using Airbrake, there's a solid response above but it wouldn't work for me without tweaking:
Works for some memory addresses but not others, not sure why...
To get info for one address only
对我有用的组合是:
我无法使用以下命令解析正确的符号信息崩溃报告中的地址和偏移量。当我这样做时,我看到了一些更有意义的东西,它似乎是一个合法的堆栈跟踪。
The combination that worked for me was:
Using atos I wasn't able to resolve the correct symbol information with the addresses and offsets that were in the crash report. When I did this, I see something more meaningful, and it seems to be a legitimate stack trace.
我必须对 symbolicatecrash 脚本进行大量修改才能使其正常运行。
据我所知,symbolicatecrash 现在要求 .app 与 .dsym 位于同一目录中。它将使用 .dsym 来查找 .app,但不会使用 dsym 来查找符号。
在尝试这些补丁之前,您应该复制您的 symbolicatecrash,这将使其在 dsym 中显示:
在 getSymbolPathFor_dsymUuid 函数中的第 212 行周围
在 matchesUUID 函数中的第 265 行周围
I had to do a lot of hacking of the symbolicatecrash script to get it to run properly.
As far as I can tell, symbolicatecrash right now requires the .app to be in the same directory as the .dsym. It will use the .dsym to locate the .app, but it won't use the dsym to find the symbols.
You should make a copy of your symbolicatecrash before attempting these patches which will make it look in the dsym:
Around line 212 in the getSymbolPathFor_dsymUuid function
Around line 265 in the matchesUUID function
这很简单,经过大量搜索后,我找到了表示整个崩溃日志文件的明确步骤。
快乐编码,
里亚兹
This is simple, after searching a lot i found clear steps to symbolicate whole crash log file.
happy coding,
Riyaz
我更喜欢一个能够代表我所有崩溃日志的脚本。
先决条件
创建一个文件夹并放入 4 个东西:
symbolicatecrash
perl 脚本 - 有很多 SO 答案告诉它的位置与崩溃匹配的构建的存档(来自Xcode Organizer。简单如
在Finder中显示
并复制)[我不确定这是必要的]< /p>所有
xccrashpoint
软件包 -(来自 Xcode Organizer。在 Finder 中显示
,您可以复制目录中的所有软件包,或您想要符号化的单个 xccrashpoint)添加目录的短脚本:
<前><代码>#!/bin/sh
echo“从目录中清除旧的崩溃”
rm -P *.crash
rm -P *.xccrashpoint
rm -r 所有崩溃
回声“已删除!”
回声“”
回声“---开始---”
回声“”
mkdir all崩溃
mkdir 符号崩溃
找到 `ls -d *.xccrashpoint` -name "*.crash" -print -exec cp {} allCrashes/ \;
cd 全部崩溃
对于 *.crash 中的崩溃;做
../symbolicatecrash $crash > ../symboledCrashes/V$crash
完毕
光盘 ..
回声“”
回声“---完成---”
回声“”
脚本
当您运行该脚本时,您将获得 2 个目录。
allCrashes
- 来自所有xccrashpoint
的所有崩溃都会在那里。symboledCrashes
- 相同的崩溃,但现在包含所有符号。在运行脚本之前,您不需要清除目录中的旧崩溃。它会自动清洁。祝你好运!
I prefer a script that will symbolicate all my crash logs.
Preconditions
Create a folder and put there 4 things:
symbolicatecrash
perl script - there are many SO answers that tells it's locationThe archive of the build that match the crashes (from Xcode Organizer. simple as
Show in Finder
and copy) [I don't sure this is necessery]All the
xccrashpoint
packages - (from Xcode Organizer.Show in Finder
, you may copy all the packages in the directory, or the single xccrashpoint you would like to symbolicate)Add that short script to the directory:
The Script
When you run the script, you'll get 2 directories.
allCrashes
- all the crashes from all thexccrashpoint
will be there.symboledCrashes
- the same crashes but now with all the symbols.you DON'T need to clean the directory from old crashes before running the script. it will clean automatically. good luck!
我发现大多数建议的替代方案在最新的 XCode 中不起作用(使用 Xcode 10 进行测试)。例如,我没有运气在 Xcode 中拖放 .crash 日志 ->主办方->设备日志-查看。
我建议使用Symbolicator工具https://github.com/agentsim/Symbolicator
I found out most of proposed alternatives did not work in latest XCode (tested with Xcode 10). For example, I had no luck drag-dropping .crash logs in Xcode -> Organizer -> Device logs -view.
I recommend using Symbolicator tool https://github.com/agentsim/Symbolicator
为了象征崩溃,Spotlight 必须能够找到与您提交给 Apple 的二进制文件同时生成的 .dSYM 文件。由于它包含符号信息,如果它不可用,您将不走运。
In order to symbolicate crashes, Spotlight must be able to find the .dSYM file that was generated at the same time the binary you submitted to Apple was. Since it contains the symbol information, you will be out of luck if it isn't available.
我对这里似乎没有“正常工作”这一事实感到有点脾气,所以我做了一些调查,结果是:
设置:接收报告的 QuincyKit 后端。没有设置符号,因为我什至无法开始弄清楚他们建议我做什么才能使其发挥作用。
修复:从服务器在线下载崩溃报告。它们被称为“崩溃”,默认情况下进入 ~/Downloads/ 文件夹。考虑到这一点,这个脚本将“做正确的事情”,崩溃报告将进入 Xcode(组织器、设备日志),并且符号化将完成。
脚本:
如果您确实使用 QuincyKit/PLCR,则可以通过执行两件事将事情自动化到您可以在 Xcode Organizer 中拖放的位置。
首先,你必须编辑远程脚本 admin/actionapi.php ~line 202。它似乎没有得到正确的时间戳,所以文件最终以 Xcode 无法识别的名称“crash”(它想要一些东西) dot crash):
其次,在 QuincyKit BWCrashReportTextFormatter.m ~line 176 的 iOS 端,将
@"[TODO]"
更改为@"TODO"
来解决这个问题人物。I got a bit grumpy about the fact nothing here seems to "just work" so I did some investigating and the result is:
Set up: QuincyKit back end that receives reports. No symbolication set up as I couldn't even begin to figure out what they were suggesting I do to make it work.
The fix: download crash reports from the server online. They're called 'crash' and by default go into the ~/Downloads/ folder. With that in mind, this script will "do the right thing" and the crash reports will go into Xcode (Organizer, device logs) and symbolication will be done.
The script:
Things can be automated to where you can drag and drop in Xcode Organizer by doing two things if you do use QuincyKit/PLCR.
Firstly, you have to edit the remote script admin/actionapi.php ~line 202. It doesn't seem to get the timestamp right, so the file ends up with the name 'crash' which Xcode doesn't recognize (it wants something dot crash):
Secondly, in the iOS side in QuincyKit BWCrashReportTextFormatter.m ~line 176, change
@"[TODO]"
to@"TODO"
to get around the bad characters.atos 已被弃用,因此如果您运行的是 OSX 10.9 或更高版本,您可能需要运行
xcrun atos
atos is being deprecated so if you are running OSX 10.9 or later you may need to run
xcrun atos
我喜欢使用 Textwrangler 来查明原始应用程序上传二进制拒绝中的错误。 (崩溃数据可以在您的 itunesConnect 帐户中找到。)使用上面 Sachin 的方法,我将 original.crash 复制到 TextWrangler,然后将我创建的 symbolicatecrash 文件复制到另一个 TextWrangler 文件。比较两个文件可以找出差异。 symbolicatecrash 文件会有差异,指出问题的文件和行号。
I like to use Textwrangler to pinpoint errors in an original app upload binary rejection. (The crash data will be found in your itunesConnect account.) Using Sachin's method above I copy the original.crash to TextWrangler, then copy the symbolicatecrash file I've created to another TextWrangler file. Comparing the two files pinpoints differences. The symbolicatecrash file will have differences which point out the file and line number of problems.
对于那些在 2022 年寻找可行解决方案的人
符号化 iPhone 应用程序崩溃报告的步骤
.txt
格式的崩溃日志转换为.crash
所有日志
部分,将其拖至删除.crash
文件请注意,具有
symbolicatecrash
的其他解决方案已被弃用,其用法如下:For those looking for a working solution in 2022
Steps to Symbolicating iPhone App Crash Reports
.txt
format to.crash
Xcode > Window > Devices and simulators
All Logs
section, drag & drop the.crash
fileNote that, the other solutions having
symbolicatecrash
is deprecated and its usage shows:我们使用Google Crashlytics来监管崩溃日志,感觉非常及时且使用方便。
文档链接:
https://docs.fabric.io/apple/crashlytics/ missing-dsyms.html#missing-dsyms
关于缺失 dSYM 的所有内容
Fabric 包含一个自动上传项目 dSYM 的工具。该工具通过 /run 脚本执行,该脚本在入门过程中添加到您的运行脚本构建阶段。但是,在某些情况下,由于独特的项目配置或您在应用程序中使用 Bitcode,dSYM 上传可能会失败。当上传失败时,Crashlytics 无法符号化和显示崩溃,并且“缺少 dSYM”警报将出现在 Fabric 仪表板上。
可以按照下述步骤手动上传缺少的 dSYM。
笔记:
作为自动 dSYM 上传工具的替代方案,Fabric 提供了一个命令行工具 (upload-symbols)),可以手动配置该工具作为项目构建过程的一部分运行。有关配置说明,请参阅下面的上传符号部分。
...
We use Google Crashlytics to supervise crash logs, the feeling is very timely and convenient to use.
Document links:
https://docs.fabric.io/apple/crashlytics/missing-dsyms.html#missing-dsyms
All about Missing dSYMs
Fabric includes a tool to automatically upload your project’s dSYM. The tool is executed through the /run script, which is added to your Run Script Build Phase during the onboarding process. There can be certain situations however, when dSYM uploads fail because of unique project configurations or if you’re using Bitcode in your app. When an upload fails, Crashlytics isn’t able to symbolicate and display crashes, and a “Missing dSYM” alert will appear on your Fabric dashboard.
Missing dSYMs can be manually uploaded following the steps outlined below.
Note:
As an alternative to the automated dSYM upload tool, Fabric provides a command-line tool (upload-symbols)) that can be manually configured to run as part of your project’s build process. See the upload-symbols section below for configuration instructions.
...