title: iOS: Symbolicating crashlogs with exception reasons
body: <p>Soo, with TestFlight's end it has become even more pressing to be able to <strong>fully understand iOS crashlogs.</strong></p>
  
  <p>There are <strong>numerous questions</strong> here at SO about this topic but in my experience none of the solutions provided enough insight into the crash itself.
  There still seems to be quite a confusion about this in the iOS world.</p>
  
  <p>For the sake of completion here are the methods and steps I found and took.</p>
  
  <p><em>(Disclamer: I had access to everyting: the .app file, the .dSYM and .crash files)</em></p>
  
  <p><strong>1| symbolicatecrash - command line utility</strong></p>
  
  <ul>
  <li>define the developer directory: <code>export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer”</code></li>
  <li>install the utility from its original directory: <code>sudo cp /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash /usr/bin</code></li>
  <li>put the <code>dSYM file, the .app file and the .crash file</code> in the <strong>same folder</strong></li>
  <li><code>symbolicatecrash “FILENAME.crash" "FILENAME.app" "FILENAME.app.dSYM"</code></li>
  </ul>
  
  <p><strong>2| atos - command line utility</strong></p>
  
  <ul>
  <li><strong>open crash file</strong>, get the <strong>memory address</strong> one line at a time from the <strong>stack trace</strong>, like so: <code>8   NAME_OF_MY_APP   0x000ad031 0xa7000 + 24625</code></li>
  <li>and use atos to symbolicate that one line: <code>atos -arch armv7 -o NAME_OF_MY_APP.app/NAME_OF_MY_APP 0x000ad031 0xa7000 + 24625</code></li>
  </ul>
  
  <p><strong>3| gdb</strong></p>
  
  <ul>
  <li>there is a great post from Jerry Krinock for a third option... but it uses gdb and gdb is no longer available in OS X Mavericks: <a href="http://www.cocoabuilder.com/archive/xcode/312725-can-symbolicate-crash-reports.html" rel="nofollow">http://www.cocoabuilder.com/archive/xcode/312725-can-symbolicate-crash-reports.html</a></li>
  </ul>
  
  <p><hr>
  <strong>Now either I'm dumb, stupid, or both but for me, the problem with all these methods is that they inconsistent.</strong> </p>
  
  <p>In my experience, symbolicating with <code>symbolicatecrash</code> will give us the <strong>method names</strong> for all the stack trace, but <strong>no line numbers</strong> and <strong>little to no info about the exception thrown.</strong></p>
  
  <p><code>Atos</code> is a bit more descriptive, but still no exception description and you have to manually do this for all the lines you want symbolicated.</p>
  
  <p>Also, <code>atos</code> sometimes points to method calls that are not in output of <code>symbolicatecrash</code>...</p>
  
  <p>When I uploaded a build to TestFlight along with the .dSYM they could give me precise method names, line numbers and exception description that I just cannot find in these symbolications.</p>
  
  <p><hr>
  <strong>Is the exception description even in the crashlog?</strong> </p>
  
  <p>Do we have to implement an <strong>unhandled exception handler within the app</strong> and send the reports "home" (ie to a <strong>web server</strong>?) to have access to <strong>what exception was thrown, where?</strong></p>