Figure 3- 10 A Mix-targeted tweak
Attention, when there’re different kinds of arrays in “Filter”, we have to add an extra “Mode
: Any” key-value pair.
- Compile + Package + Install
We’ve installed Theos, created our first tweak project via NIC, and gone over all project
files. In the end, we must compile the tweak and install it on iOS to start experiencing “safe
mode” again and again. Are you excited?
-^ Compile
“make” command is used to compile Theos project. Just run “make” under our Theos
project directory:
snakeninnysiMac:iosreproject snakeninny$ make
Making all for tweak iOSREProject...
Preprocessing Tweak.xm...
Compiling Tweak.xm...
Linking tweak iOSREProject...
Stripping iOSREProject...
Signing iOSREProject...
From the output, we know Theos has finished preprocessing, compiling, linking, stripping
and signing. After that, an “obj” folder appears in the current folder.
snakeninnysiMac:iosreproject snakeninny$ ls - l
total 32
- rw-r--r-- 1 snakeninny staff 262 Dec 3 09:20 Makefile
- rw-r--r-- 1 snakeninny staff 0 Dec 3 11:28 Tweak.xm
- rw-r--r-- 1 snakeninny staff 223 Dec 3 09:05 control
- rw-r--r--@ 1 snakeninny staff 175 Dec 3 09:48 iOSREProject.plist
drwxr-xr-x 5 snakeninny staff 170 Dec 3 11:28 obj
lrwxr-xr-x 1 snakeninny staff 11 Dec 3 09:05 theos - > /opt/theos
There is a .dylib file in it:
snakeninnysiMac:iosreproject snakeninny$ ls - l ./obj
total 272
- rw-r--r-- 1 snakeninny staff 33192 Dec 3 11:28 Tweak.xm.b1748661.o
- rwxr-xr-x 1 snakeninny staff 98784 Dec 3 11:28 iOSREProject.dylib