26

Is there any way to get the UUID the dSYM file has from the application in runtime?

I tried with a sample code I found but it returns a different UUID than the dSYM's one.

Thank you.

George Taskos
  • 8,324
  • 18
  • 82
  • 147
  • The UUID generated for the app build is identical to the UUID generated for the dSYM at the same time. The UUIDs (for each architecture) are automatically added to both files automatically. Why do you need to fetch this UUID at runtime? – Kerni Mar 26 '14 at 21:52

3 Answers3

57
dwarfdump -u <PathToYourAppsDsym>

This will show you the associated UUID of respective dsym

Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256
6

If you need to know the UUID associated with your iOS application there's a neat trick you can do to get it:

$> mdls -name com_apple_xcode_dsym_uuids -raw "$APP_NAME.app.dSYM" | grep -e \" | sed 's/[ |\"]//g'

What this does is query the Spotlight metadata for the UUID key for your application, you're passing in the .dSYM because that's where it is associated with.

The grep command is there to only consider the line with the actual UUID; the sed command cleans whitespace and quotation marks.

I used this because I need to upload .xcarchive directories to a server, this server does not store any Spotlight metadata so I need to put it there explicitly. This is all done in the context of associating crash logs with specific versions of a binary.

Note: Replace $APP_NAME with the name of your application.

gagarwal
  • 4,224
  • 2
  • 20
  • 27
  • Thank youm but I need to get this from inside my application. Is that feasible using Objective-C code? – George Taskos Mar 26 '14 at 21:16
  • I am not clear if I understood your question correctly, but ".app" do not know anything about DSYM file. Can you explain bit more, why you need to to that? – gagarwal Mar 26 '14 at 21:22
  • So I will be able to symbolicate properly. it seems that I have to have the dSYM file build UUID, corresponds to the application image base address uuid but this is inconsistent. I maybe wrong with this. – George Taskos Mar 26 '14 at 21:28
  • 1
    I have resolved my issue, thank you so much. The answer is in my original post long time ago if you are interested http://stackoverflow.com/questions/19848567/how-to-get-the-build-uuid-in-runtime-and-the-image-base-address, I was just archiving the project in result to get the wrong dSYM UUID than the one I was testing. – George Taskos Mar 26 '14 at 21:45
0

To get the build UUID of the application check this answer of my older post. How to get the build UUID in runtime and the image base address

Community
  • 1
  • 1
George Taskos
  • 8,324
  • 18
  • 82
  • 147