Created
February 20, 2015 10:20
-
-
Save jmoody/9cadd0e1e3c4e4e9b31f to your computer and use it in GitHub Desktop.
script to call the current Xcode 6's symbolicatecrash binary
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/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