├── README ├── slowmo.sh └── slowmo.m /README: -------------------------------------------------------------------------------- 1 | slowmo is a mach injection hack to turn on slow motion support in iPhone Simulator 3.0 2 | 3 | * Run ./build_slowmo -- that spits out a _slowmo binary 4 | * Launch the iPhone Simulator 5 | * Run ./slowmo.sh 6 | * Press shift three times to turn slowmo on and off 7 | -------------------------------------------------------------------------------- /slowmo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | SIM_PID=`ps x | grep "iPhone Simulator " | grep -v grep | awk '{print $1}'` 3 | if [ "$SIM_PID" == "" ]; then 4 | echo "iPhone Simulator.app must be running to turn on slowmo." 5 | exit 1; 6 | fi 7 | 8 | cat < /dev/null 9 | attach $SIM_PID 10 | p (void *)dlopen("$(cd "$(dirname "$0")"; pwd)/_slowmo", 2) 11 | detach 12 | EOM 13 | 14 | echo "Press shift three times in the iPhone Simulator to toggle slowmo on and off." 15 | -------------------------------------------------------------------------------- /slowmo.m: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | @protocol SlowmoMonitorWindow 5 | - (void)setAllowTripleShiftSlowMotion:(BOOL)doit; 6 | @end 7 | 8 | @protocol SlowmoMonitorController 9 | + (id)sharedInstance; 10 | - (id)monitorWindow; 11 | @end 12 | 13 | void inject_init(void) __attribute__((constructor)); 14 | void inject_init(void) { 15 | [[(id)[NSClassFromString(@"MonitorController") sharedInstance] monitorWindow] setAllowTripleShiftSlowMotion:YES]; 16 | } 17 | --------------------------------------------------------------------------------