johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 565 forks source link

Can't patch my project (Xcode 8 unsigned) :/ #182

Closed absolutlabs closed 7 years ago

absolutlabs commented 7 years ago

Hello

When I try to patch a project, the console only prints :

Patching project contained in: /Users/XXXXXX.

Modified XXXXX/main.m ...

The main.m file is correctly updated, but there is no iOSInjectionProject folder in my project folder (as it used to be with Xcode 7).

I tried several times to rebuild the plugin (unsign xcode, building source code after updating certificates : https://johntmcintosh.com/blog/2016/10/03/code-injection-ios ), but same result everytime :/

Did I miss something ?

Thanks !

johnno1962 commented 7 years ago

iOSInjectionProject is created when you perform the actual injection.

absolutlabs commented 7 years ago

ok, so it's not working :( The app is paused for a moment and resumed instantly. Nothing is written in the console.

Is there something I can do to get some logs and try to help ?

johnno1962 commented 7 years ago

Is this device or simulator. If it’s the simulator then probably your InjectionLoader is not signed correctly. If it’s the simulator and it’s not signed I can’t explain that!

absolutlabs commented 7 years ago

Found it ! :)

As I have different developer accounts I had to update the Run Script build phase to tell Xcode the correct identity to use. I replaced 'iPhone Developer' with 'iPhone Developer: Vincent (ABCDEF1234)' and the plugin was correctly built and loaded, but I couldn't inject code.

=> I switched to 'Mac Developer: Vincent (ABCDEF1234)' and everything is now working fine

Thanks for pointing me to the right direction, and thank you so much for your (huge-)time-saving plugin