为什么atos命令无法为我的iOS崩溃日志找到符号?(Why is the atos command unable to find symbols for my iOS crash log?)

系统教程 行业动态 更新时间:2024-06-14 16:59:17
为什么atos命令无法为我的iOS崩溃日志找到符号?(Why is the atos command unable to find symbols for my iOS crash log?)

我正在尝试诊断我的iOS应用程序崩溃。 这里的其他人建议使用atos命令来执行此操作,如以下命令中所示:

atos -arch armv7 -o ''/'appname.app.dSYM' symbolicatecrash "appname_2011-08-03-111047_Test-iPhone.crash" "apname.app"

但是,当我尝试此操作时,该命令将失败并显示错误

atos无法加载文件的符号

什么可能导致此错误,我该如何解决这个问题? 此外,这是从崩溃日志中确定iOS应用程序中崩溃的内存位置的正确方法吗?

I'm trying to diagnose a crash of my iOS application. Others here have suggested the use of the atos command to do this, like in the following commands:

atos -arch armv7 -o ''/'appname.app.dSYM' symbolicatecrash "appname_2011-08-03-111047_Test-iPhone.crash" "apname.app"

When I attempt this, however, the command fails with the error

atos cannot load symbols for the file

What could be causing this error, and how can I fix this? Also, is this the proper way to determine the memory location of a crash within an iOS application from a crash log?

最满意答案

dSYM文件/目录必须与构建提交的应用商店版本时创建的完全相同 。 即使是从完全相同的代码库构建的另一个也不会与崩溃日志匹配。

一些可能的原因:

你构建并测试了你的应用程序,一旦你确定它很好,你保存了二进制文件(.app和.dSYM),然后你用appstore签名重建,忘了存档.app和.dSYM的那个版本。 现在,您的存档版本与appstore版本的崩溃不匹配。 您正尝试使用源代码控制中新建的.app和.dSYM进行符号化。 您需要使用已提交的相同.app和.dSYM。

如果您的计算机上有任何正确的dSYM(并且安装了正确的iOS调试信息),那么当您导入崩溃日志时,Xcode将自动找到它并创建崩溃日志的符号副本。 它使用聚光灯来查找在构建时生成的唯一字符串(这就是为什么要匹配的确切版本)。 请注意,匹配的.app文件也需要存在。

最佳做法是构建和测试发布版本,然后重新签名以进行提交(而不是为app-store签名提交单独的版本)。 这样你就可以在正确的地方保存正确的.app和.dSYM。 我将它们放在源代码管理中并用版本号标记它。

The dSYM file/dir must be the exact same one that was created when you built your submitted app-store build. Even another one built from the exact same code-base won't match against your crash-log.

Some potential causes:

You built and tested your app and once you decided it was fine you saved the binaries (.app and .dSYM), then you rebuilt with appstore signing and forgot to archive THAT version of of the .app and .dSYM. Now your archived version won't match with crashes form the appstore version. You are trying to symbolicate using a freshly-built .app and .dSYM from source-control. You need to use the same .app and .dSYM that were submitted.

If you do have the correct dSYM anywhere on your computer (and the correct iOS debug info installed) then Xcode will automatically find it and create a symbolicated copy of the crash-log when you import the crash-log. It does this using spotlight to find a unique string that's generated at build time (this is why the exact version is needed for it to match). Note that the matching .app file also needs to be present.

Best practice is to build and test a release version, then re-sign it for submission (rather than submitting a separate build for app-store signing). This way you can preserve the correct .app and .dSYM somewhere safe. I put them in source control and tag it with the release number.

更多推荐

本文发布于:2023-04-16 14:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/6c19aa356ae86efcc130296ec7d63248.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:符号   命令   日志   iOS   atos

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!