Project is now on github and here is the link to my issue
I successfully compiled the whole thing and able to run rejector and rejectee separately. But the injector will crash the injectee when injecting code to the target process.
mach_inject_test_injectee.app 's standard output:
mach error on bundle load (os/kern) successful
mach error on bundle load (os/kern) successful
mach error on bundle load (os/kern) successful
mach error on bundle load (os/kern) successful
mach error on bundle load (os/kern) successful
FS rep /Users/Malic/Documents/Code/c/mach_star/mach_inject_test/build/Development/mach_inject_test_injector.app/Contents/Resources/mach_inject_test_injected.bundle/Contents/MacOS/mach_inject_test_injected
LOADDDDDDDDDD!
Assertion failed: (0), function +[injected_PrincipalClass load], file /Users/Malic/Documents/Code/c/mach_star/mach_inject_test/injected-PrincipalClass.m, line 25.
Abort trap
mach_inject_test_injector 's standard output
injecting into pid 3680
injecting pid
mach_inject failing.. (os/kern) successful
mach inject done? 0
hi
It seems from the output the injector is not notified from the injectee, any ideas? thanks.