Skip to content

Instantly share code, notes, and snippets.

@fousa
Created January 29, 2015 08:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fousa/bc6431ea6706c3d9689c to your computer and use it in GitHub Desktop.
Save fousa/bc6431ea6706c3d9689c to your computer and use it in GitHub Desktop.
Get the UUID from your dSYM.
#! /usr/bin/ruby
# You should pass the dSYM path from the dSYM file you
# want to lookup the UUID from.
unless ARGV.count == 1
puts '!!! You should pass the dSYM path in order to lookup the UUID.'
exit
end
dsym_path = ARGV.first
# Check if the dSYM file exists.
puts '--- Checking the dSYM file path.'
unless File.exist?(dsym_path)
puts '!!! The dSYM file does not exist at the file path'
exit
end
# Fetch the UUID from your dSYM
puts '--- Fetching the UUID.'
shell_command = 'mdls -name com_apple_xcode_dsym_uuids'
shell_command << " -raw '#{dsym_path}'"
shell_command << ' | grep -e \" | sed \'s/[ |\"]//g\''
puts '--- Here is the UUID information:'
output = `#{shell_command}`
output = output.gsub("\n", "")
output.split(",").each do |uuid|
puts "*** #{uuid}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment