Symbolicate crashlog of locally built iOS App
Asked Answered
E

4

8

I've read numerous threads on stackoverflow and on apple site and I still cannot get basics to work. I make a debug build of my app, I install it on my phone, this build intentionally crashes. I run this app while not connected with Xcode debugger. The app crashes, how do I see now function names and line numbers of the crash backtrace?

I tried to open devices windows in Xcode and there Iviewed the log, I see my app crashlog, I see that there were multiple function calls in my code before it crashed, but all of them are shown as hex addresses and not actually symbolicated. What do I need to do to make it work?

Ejaculation answered 25/5, 2017 at 0:25 Comment(0)
H
10

Open Project Settings. Go to your Target and set the Debug Information Format to DWARF with dSYM File for Debug. Do the same for the Project


Project:
Project


Target: Target

Holdover answered 25/5, 2017 at 8:29 Comment(2)
and then what? The question is how to fully symbolicate an applications existing crash report from device where the app was only installed via Xcode for development. The crash happened whilst device not plugged in to Xcode and has not archive so no .dysm fileRotl
I'll check that, but I'm pretty sure we have all the symbols properly setup, as it works with real releases and from app store we get it properly symbolicated. My question is about local build onlyEjaculation
F
2

Xcode will symbolicate the crash report, which can take a few seconds, only if you still have the matching symbols of the build that triggered the crash. If the symbol exists simply wait a bit and the crash report will update.

If you in the meantime changed some code and triggered a new build, then the build and symbol files will be overwritten and get a new UUID (per CPU architecture). That UUID is part of the crash report (Binary Images section) and used to find the matching symbol file on your Mac. If that isn't found, then symbolication can not work.

Federation answered 25/5, 2017 at 15:43 Comment(1)
I'll check it. In my case I make a build, run it on device (from xcode menu) which installs my app on the phone. Then, I stop execution from XCode. Now I have my build on the phone and I run it directly from the phone and it crashes. That's the use case, all the build artifacts are still intact on xcode side. I've done some tools myself that symbolicate backtraces and it doesn't take more than a second to do so and I had them listed and open on XCode side for quite a while and they never updated. They list some function names from OS components, but my code is all hex.Ejaculation
R
1

Could it be you are using an invalid character in your project name?

I had this same problem with seeing the hex and not the actual function names. Turns out the issue was a unicode character in my Apps name "➕". I removed it and then the subsequent crash logs in xcode would show the function calls correctly.

Rotl answered 25/2, 2018 at 7:51 Comment(0)
R
1

Any solution for this. I am having exactly this problem. I build, run it on my iPad, stop execution, and then manually start the app on the iPad. It crashes, I go to the Device Logs, and the crash is there but it won't symbolicate:

0   CoreFoundation                  0x1b0d035ac __exceptionPreprocess + 220
1   libobjc.A.dylib                 0x1c4d7d42c objc_exception_throw + 59
2   CoreFoundation                  0x1b0c0c1b4 +[NSException raise:format:arguments:] + 99
3   Foundation                      0x1b1f6a7bc -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 131
4   xxxxxxxxxxxxxxx                 0x102f6c2d4 0x102f64000 + 33492
5   xxxxxxxxxxxxxxx                 0x102f6c23c 0x102f64000 + 33340
6   xxxxxxxxxxxxxxx                 0x102f76754 0x102f64000 + 75604
7   xxxxxxxxxxxxxxx                 0x102f764ac 0x102f64000 + 74924
8   xxxxxxxxxxxxxxx                 0x102f76f40 0x102f64000 + 77632
9   xxxxxxxxxxxxxxx                 0x102f83fa0 0x102f64000 + 130976

There are no Unicode characters in my app name (which isn't really xxxxxxx).

Roybal answered 20/10, 2020 at 18:30 Comment(1)
The first answer fixed it for me. Go to your Project and set the Debug Information Format to DWARF with dSYM File for Debug (the Target was already set this way (Xcode 12).Roybal

© 2022 - 2024 — McMap. All rights reserved.