- Profiling a Unity app in the XCode profiler Instruments does not show symbols.
- I have built the app with dSYM enabled, but it does not show the symbols correctly.
- I already run Instruments with symbols, but suddenly the symbols vanished.
Starting Instruments, or restarting a session, does not show symbols for user code although the solution is built with dSYM.
Symbols are useful to identify the function responsible for allocations or crashes. You need to build your app with symbols (stored in dSYM file) to show function names instead of cryptic memory addresses during profiling. This will guide you through building a Unity project and profiling it via Xcode/Instruments. This is useful if you want to profile time spent in various methods, or if you want to see some allocations that Unity profiler might fail to catch for some reason.
Unity:Build iOS Development Build from Unity (Shift + Command + B)
Xcode:Stop Running App if applicable (Command + .)
Xcode:Clean Product (Shift + Command + K)
Xcode:Build Product (Command + B)
Xcode:Open Log Navigator (Command + 7) to find your projects
Log:Find entry for Generating
Log:Click the icon on right side of entry for more info.
Path:Will be similar to
Xcode:Open Profiler (Command + I) of choice.
Example:Stop Trace (Command + R) after some time.
Profiler:Re-Symbolicate Document to get Symbols if needed.
dSYM:In the top menu, go to File/Re-Symbolicate Document...
dSYM:Enter your Binary name in Search box.
Note:This is your Unity project name.
.app.dSYMfor your Binary.
Locate:Select your Binary and press Locate
Locate:Browse to your
.app.dSYMand press Open.
Locate:If you get error here about UUID, do a clean/rebuild.
Profiler:Your profiler should now have useful information and correct symbols.
*alternatively you can use the Project Explorer to find the dSYM file by clicking onto the Derived Data arrow and go to Products/<Mode>-iphoneos/.
If you want to symbolicate crash logs you can read about it here.
This article applies to Unity versions 4.6.0f1 and higher, Xcode 6 and higher, iOS 6.0 and higher
Please sign in to leave a comment.