Skip to content

Instantly share code, notes, and snippets.

@jmoody
Created February 20, 2015 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmoody/9cadd0e1e3c4e4e9b31f to your computer and use it in GitHub Desktop.
Save jmoody/9cadd0e1e3c4e4e9b31f to your computer and use it in GitHub Desktop.
script to call the current Xcode 6's symbolicatecrash binary
#!/usr/bin/env ruby
# The symbolicatecrash binary that ships with Xcode 6 is hard to find
# and has a bug that requires 'DEVERLOPER_DIR' to be defined.
#
# Error: "DEVELOPER_DIR" is not defined at \
# Xcode.app/Contents/SharedFrameworks/<snip>/symbolicatecrash line 60
# Usage:
# $ symbolicatecrash -v \
# -o symbolicated.log \
# OutSystems_2015-02-20-030202_stern.crash \
# OutSystems.app.dSYM
module Xcode
def self.xcode_developer_dir
if ENV['DEVELOPER_DIR']
ENV['DEVELOPER_DIR']
else
# fall back to xcode-select
`xcode-select --print-path`.chomp
end
end
def self.symbolicatecrash
dev_dir = self.xcode_developer_dir
path = 'SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash'
File.expand_path(File.join(dev_dir, '..', path))
end
def self.env
{ 'DEVELOPER_DIR' => self.xcode_developer_dir }
end
end
exec(Xcode.env, Xcode.symbolicatecrash, *ARGV)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment