Created
December 14, 2014 16:09
-
-
Save mmmulani/9cbb5e4083b172c9a076 to your computer and use it in GitHub Desktop.
Generates a class-dump for all of Xcode along with C symbols
This file contains hidden or 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
#!/bin/bash | |
# Run this with: | |
# find /Applications/Xcode.app/ -type f -perm -100 -exec ./extract.sh '{}' \; | |
# Afterwords run: (to remove all empty directories) | |
# find . -d -type d -empty -exec rmdir {} \; | |
APP=$1 | |
BASE_DIR=`pwd` | |
OUTPUT=$(file "$APP") | |
if [[ $OUTPUT == *Mach-O* ]]; then | |
TARGET_DIR=$BASE_DIR"/"$APP | |
mkdir -p "$TARGET_DIR" | |
class-dump -H -o "$TARGET_DIR" "$APP" > /dev/null | |
nm -g -U -j "$APP" > "$TARGET_DIR"/exported_symbols.h | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment