Created
January 29, 2015 08:39
-
-
Save fousa/bc6431ea6706c3d9689c to your computer and use it in GitHub Desktop.
Get the UUID from your dSYM.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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