Skip to content

Instantly share code, notes, and snippets.

@mitchcohen
mitchcohen / gist:464f99c59060d68b06fe
Created April 14, 2015 12:09
Symbolicating Xcode crash reports
Now and then I need to manually symbolicate an Xcode crash report. Xcode can often do this, but not always. Here are steps that are specifically for a Watch Extension, but can be easily applied to just about anything.
You need the Watch Extension's dSYM from the archive created when you submitted the app. The general form:
$ symbolicatecrash report.crash app.dSYM
or more specifically, for a WatchKit Extension:
$ export DEVELOPER_DIR=`xcode-select --print-path`
$ /Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources/symbolicatecrash ~/Desktop/CrashLog1.crash ~/Desktop/yourApp.xcarchive/dSYMs/yourApp\ WatchKit\ Extension.appex.dSYM > ~/Desktop/CrashLog1Symbolicated.crash
@mitchcohen
mitchcohen / AddXcodeUUIDToPlugin
Last active August 29, 2015 14:16
Get XToDo plugin working in Xcode 6.2
Gets this: https://github.com/trawor/XToDo working in Xcode 6.2.
defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
(Or just open Xcode's Info.plist file and find it there.)
This returns Xcode's DVTPlugInCompatibilityUUID, something like:
AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE
@mitchcohen
mitchcohen / xcode-burn-iOS-icon-buildInfo.sh
Created May 24, 2013 12:31
Xcode prebuild script to burn git info into iOS app icon. Based on https://github.com/krzysztofzablocki/IconOverlaying and http://merowing.info/2013/03/overlaying-application-version-on-top-of-your-icon/, but moved into gist with some changes. Basics - rename your icons from Icon.png to Icon_base.png (etc).
# Burns build info into app icon
# exit 0
# NOTE: This should still copy icons if git and convert are not installed...
# first, confirm git and convert (ImageMagick) exist
hash git 2>/dev/null || { echo >&2 "Git required, not installed. Aborting icon burn script."; exit 0; }
hash /usr/local/bin/convert 2>/dev/null || { echo >&2 "Convert required, not installed. Aborting icon burn script."; exit 0; }
commit=`git rev-parse --short HEAD`
@mitchcohen
mitchcohen / xcode-git-buildnumber.sh
Last active December 17, 2015 16:39 — forked from jpwatts/xcode-git-version.sh
Xcode build phase script to set the build number to the number of commits to the git master branch, figuring the commit will be that number in the commit history (never mind the argument of the first commit being #0 or #1...)
# Use the number of commits on the master git branch as build number.
# first, confirm git exists
hash git 2>/dev/null || { echo >&2 "Git required, not installed. Aborting build number update script."; exit 0; }
VERSION=$(git --git-dir="${PROJECT_DIR}/.git" --work-tree="${PROJECT_DIR}" rev-list master | wc -l)
# eventually this will be (number of commits)+1. Mixed opinion here. +1 on dev machine, but not on build/distr machine.
# VERSION=`expr $VERSION + 1`
echo "Build number is now $VERSION"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $VERSION" ${INFOPLIST_FILE}