xplat
xplat

Reputation: 8636

Get the UUID that the dSYM have when archive in runtime for the application

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.

Upvotes: 26

Views: 18408

Answers (3)

Sazzad Hissain Khan
Sazzad Hissain Khan

Reputation: 40247

dwarfdump -u <PathToYourAppsDsym>

This will show you the associated UUID of respective dsym

Upvotes: 61

xplat
xplat

Reputation: 8636

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

Upvotes: 0

gagarwal
gagarwal

Reputation: 4244

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.

Upvotes: 7

Related Questions