johnno1962 / injectionforxcode

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

Can't get injection to work on a Mac app #56

Closed chriseidhof closed 9 years ago

chriseidhof commented 9 years ago

Hey,

I'm on Xcode 7 beta 6 (also tried with Xcode). Somehow I can't get the plugin to work. My friend who is on almost the same setup has no problems. In any case, I found out that the $executable in the per scripts is set to my home dir. I spent a while trying to trace down the problem, but couldn't find it...

As a temporary workaround, I changed this:

-            if ( status & INJECTION_DEVICEIOS8 ) {
+            if ( status /*& INJECTION_DEVICEIOS8 */) {

in BundleInjection.h, just to force sending the executable path. By the way, I'm working on a Mac app, not an iOS app.

johnno1962 commented 9 years ago

Hey Chris, enjoy your talks! I’ve pushed this as a fix for OSX and another for Swift on OSX to keep things rolling. injectionforxcode is in maintenance only mode at the moment though I try to keep up with Xcode versions - the code could realy do with a fresh start. You did very well to track down the problem. Thanks!

chriseidhof commented 9 years ago

Thanks for the fix. Yeah it was easy to motivate myself to spend half an hour finding the problem: I know it's going to save me an hour tomorrow ;). Shall we close the issue?