-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxcode-dump.sh
executable file
·75 lines (55 loc) · 1.98 KB
/
xcode-dump.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# Change this path to point to the location of class-dump
CLASS_DUMP_PATH="class-dump"
# Change this path to point to your copy of Xcode
XCODE_PATH="/Applications/Xcode.app"
# The following variables should not require changing
LIBRARY_FRAMEWORK_PATH=$XCODE_PATH"/Contents/Developer/Library/Frameworks/"
FRAMEWORK_PATH=$XCODE_PATH"/Contents/Frameworks/"
SHARED_FRAMEWORK_PATH=$XCODE_PATH"/Contents/SharedFrameworks/"
PLUGIN_PATH=$XCODE_PATH"/Contents/PlugIns/"
# Class-dump library frameworks
echo
echo "Starting library framework dump..."
echo "----------------------------------"
echo
for file in $LIBRARY_FRAMEWORK_PATH*.framework; do
name=${file##*/}
baseName=${name%.framework}
echo "Class dumping $name..."
$CLASS_DUMP_PATH -HI -o ~/Desktop/XcodeDump/Developer/Library/Frameworks/$baseName $LIBRARY_FRAMEWORK_PATH$name/Versions/A/$baseName
echo
done
# Class-dump frameworks
echo "Starting framework dump..."
echo "--------------------------"
echo
for file in $FRAMEWORK_PATH*.framework; do
name=${file##*/}
baseName=${name%.framework}
echo "Class dumping $name..."
$CLASS_DUMP_PATH -HI -o ~/Desktop/XcodeDump/Frameworks/$baseName $FRAMEWORK_PATH$name/Versions/A/$baseName
echo
done
# Class-dump shared frameworks
echo "Starting shared framework dump..."
echo "---------------------------------"
echo
for file in $SHARED_FRAMEWORK_PATH*.framework; do
name=${file##*/}
baseName=${name%.framework}
echo "Class dumping $name..."
$CLASS_DUMP_PATH -HI -o ~/Desktop/XcodeDump/SharedFrameworks/$baseName $SHARED_FRAMEWORK_PATH$name/Versions/A/$baseName
echo
done
# Class-dump plugins
echo "Starting plugin dump..."
echo "-----------------------"
echo
for file in $PLUGIN_PATH*.ideplugin; do
name=${file##*/}
baseName=${name%.ideplugin}
echo "Class dumping $name..."
$CLASS_DUMP_PATH -HI -o ~/Desktop/XcodeDump/PlugIns/$baseName $PLUGIN_PATH$name/Contents/MacOS/$baseName
echo
done