johnno1962 / injectionforxcode

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

crash when adding injected function #116

Open nickkjordan opened 8 years ago

nickkjordan commented 8 years ago

I'm getting a crash during injection, but only when injected exists in the class. I'm working in Swift.

In IvarAccess.h, getting EXC_BAD_ACCESS here

I commented out the else if block, and injection works fine

johnno1962 commented 8 years ago

-injected is the least reliable part of injection alas, particularly for Swift. You can tap into when injections occur with “INJECTION_BUNDLE_NOTIFICATION” as an alternative.

johnno1962 commented 7 years ago

This may be fixed now. Can you try again?