I’ve been battling a pesky case of missing symbols when debugging on iOS-based devices lately. It only started when I upgraded to Xcode 4. I was beginning to think I’d be symbolicating by hand until Apple sorted things out — fear not, I’ve found a workaround!
- First up, profile your app using Instruments.app — I use the ‘Time Profiler’ instrument, because it’s pretty easy to see when things aren’t symbolicating properly. If you’re (un)lucky, your app will profile just fine, but you’ll be left with a bunch of addresses rather than nicely named methods and functions;
- Stop profiling your app, but don’t close the Instruments document;
- Go to ‘File » Re-Symbolicate Document…’;
- Find your app’s name in the list (search if you have to) and select it;
- Click the ‘Locate’ button, and find the dSYM for your app (as of Xcode 4, it’ll be in
~/Library/Developer/Xcode/DerivedData/$PRODUCT/Build/Products/Debug-iphoneos/
)
- Once you’ve done this, click OK and voila symbol names should spring to life!
Any subsequent runs of your app in this Instruments document should properly symbolicate, allowing you to get back to making your app faster and smoother — enjoy!