xcode 如何符号化以 .txt 格式而非 .crash 格式收到的 Apple 崩溃报告

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/40479835/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 09:34:02  来源:igfitidea点击:

How to symbolicate crash report from Apple received in .txt format not .crash format

xcodecrash-reportssymbolicatecrashsymbolicate

提问by bably

My app got rejected from Apple and I have got crash reports in .txt format instead of .crash format.

我的应用程序被 Apple 拒绝,我收到了 .txt 格式而不是 .crash 格式的崩溃报告。

How can I symbolicate or read the crash report ?

我如何符号化或阅读崩溃报告?

回答by Shakti

When you get your crash report as a .txt file just follow these steps :

当您获得 .txt 文件形式的崩溃报告时,只需按照以下步骤操作:

  1. Change the file extension .txtto .crash(eg mycrash.txtto mycrash.crash).

  2. Create a new folder in desktop and copy the mycrash.crashfile to the newly created folder.

  3. Copy the .dSYM file:

    • update: download all DSYMs from appstoreconnect activity- they are properly named with their UUIDs
    • Unzip DSYMs, then copy the App and Sybolicate script as defined below: https://appstoreconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/[appID]/activity/ios/builds/[version]/[build]/details
  4. Open the Archives window in Xcode by navigating the menus: xcode -> window -> orgnizeror xcode -> product -> Archive:

    • Select any Archives of your app Right click on it, then select Show in Finder

    • Right-click on appname.xcarchiveand select Show Package Contents.

    • Open the dSYMs folder and get the .dSYM file, and paste it too in the newly created folder.

    • Copy the .app file from the same xcarchive to the new folder.

  5. Go to path /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/

    • Finder hotkey (? + ? + G) and just paste in the path.
  6. Copy the symbolicatecrashfile to the newly created folder.

    The folder should now have:
    • mycrash.crash
    • myapp.app
    • myapp.app.dSYM
    • symbolicatecrash
  7. Open terminal, navigate to your folder path and then run:
    $ export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

  8. Then run the symbolicate command on your crash like so:
    $ ./symbolicatecrash mycrash.crash > symbolicated.crash

  1. 更改文件扩展名.txt.crash(例如mycrash.txtmycrash.crash)。

  2. 在桌面创建一个新文件夹并将mycrash.crash文件复制到新创建的文件夹中。

  3. 复制 .dSYM 文件:

    • 更新:从 appstoreconnect 活动下载所有 DSYM - 它们用它们的 UUID 正确命名
    • 解压缩 DSYM,然后复制如下定义的 App 和 Sybolicate 脚本: https://appstoreconnect.apple.com/WebObjects/iTunesConnect.woa/ra/ng/app/[appID]/activity/ios/builds/[version]/[build]/details
  4. 通过导航菜单在 Xcode 中打开档案窗口:xcode -> window -> orgnizerxcode -> product -> Archive

    • 选择您的应用程序的任何档案右键单击它,然后选择在 Finder 中显示

    • 右键单击appname.xcarchive并选择Show Package Contents

    • 打开 dSYMs 文件夹并获取 .dSYM 文件,并将其粘贴到新创建的文件夹中。

    • 将 .app 文件从同一个 xcarchive 复制到新文件夹。

  5. 转到路径 /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/

    • Finder 热键 (? + ? + G) 并粘贴在路径中。
  6. symbolicatecrash文件复制到新创建的文件夹中。

    该文件夹现在应该有:
    • mycrash.crash
    • 我的应用程序
    • myapp.app.dSYM
    • 象征性的崩溃
  7. 打开终端,导航到您的文件夹路径,然后运行:
    $export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

  8. 然后在你的崩溃运行symbolicate命令,像这样:
    $./symbolicatecrash mycrash.crash > symbolicated.crash

回答by yoc

  1. Change the file extension .txt to .crash
  2. Make sure your device is plugged in.
  3. Go to xcode -> window -> devices and simulators -> view device logs.
  4. Drag the file that of the crash log and drag it to the left side of that windows.
  5. Now you can see the log and what happen there.
  1. 将文件扩展名 .txt 更改为 .crash
  2. 确保您的设备已插入。
  3. 转到 xcode -> 窗口 -> 设备和模拟器 -> 查看设备日志。
  4. 拖动崩溃日志的文件并将其拖动到该窗口的左侧。
  5. 现在您可以看到日志以及那里发生的事情。

回答by DarkoB

Can't add a comment to Shakti's answer, but I had trouble with steps 5 and 6 as it was complaining about DEVELOPER_DIR not being specified.

无法对 Shakti 的回答添加评论,但我在第 5 步和第 6 步中遇到了问题,因为它抱怨未指定 DEVELOPER_DIR。

Some googling later I found out that the part 5 should have been:

谷歌搜索后我发现第 5 部分应该是:

5 now open terminal cd your folder path and then type this

5 现在打开终端 cd 你的文件夹路径,然后输入这个

export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

So, the "export" is also a keyword and a part of the command, just in case anyone else gets the same problem.

因此,“export”也是一个关键字和命令的一部分,以防万一其他人遇到同样的问题。

回答by Suraj K Thomas

It worked for me ,might help some one else also

它对我有用,也可能对其他人有帮助

Apple gives you crash log in .txt format , which is unsymbolicated

Apple 为您提供 .txt 格式的崩溃日志,这是无符号的

**

**

With the device connected

连接设备后

**

**

  • Download ".txt" file , change extension to ".crash" enter image description here
    • Open devices and simulators from window tab in Xcode
    • select device and select device logs
    • drag and drop .crash file to the device log window
  • 下载“.txt”文件,将扩展名更改为“.crash” 在此处输入图片说明
    • 从 Xcode 的窗口选项卡打开设备和模拟器
    • 选择设备并选择设备日志
    • 将 .crash 文件拖放到设备日志窗口

enter image description here

在此处输入图片说明

We will be able to see symbolicated crash logs over there

我们将能够在那里看到符号化的崩溃日志

Please see the link for more details on Symbolicating Crash logs

有关符号化崩溃日志的更多详细信息,请参阅链接

回答by user1039695

By dragging the .crash file in organiser was not completely symbolicating my crash. So i tried another way of doing it.

通过在管理器中拖动 .crash 文件并不能完全象征我的崩溃。所以我尝试了另一种方法。

If archived builds is already on your computer. Then you don't need to give .app and dsym file. Just run below commands in terminal.

如果存档版本已经在您的计算机上。那么你不需要给 .app 和 dsym 文件。只需在终端中运行以下命令即可。

export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"

Hit enter

按回车

    /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/symbolicatecrash /Your/Crash/File/Path/c.crash > /Your/Symbolicated/Crash/File/Path/c.crash

Hit enter and check the path you have given.

按回车键并检查您提供的路径。