johnno1962 / injectionforxcode

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

Crash when inject source #246

Closed demonliu closed 6 years ago

demonliu commented 6 years ago

image

Installed via Alcatraz, Xcode 9.2, Looking forward to your reply.

johnno1962 commented 6 years ago

Could be any invalid pointer in your app. You won’t be able to use the injected() method to detect changes. Either try INJECTION_BUNDLE_NOTIFICATION instead or the new version “InjectionIII" in the mac app store.

demonliu commented 6 years ago

Thank you so much!

demonliu commented 6 years ago

Sorry, but i installed “InjectionIII" via app store, but there is no 'inject source' item . Although i followed the action in http://johnholdsworth.com/injection.html , it didn't work.. image

johnno1962 commented 6 years ago

InjectionIII works differently from the previous versions. You need to add code to your application and then after you’ve selected the project all that should b required is to save the file for it to inject. Try the example app http://johnholdsworth.com/GettingStarted.zip to get you up and running.

demonliu commented 6 years ago

Sorry that i didn't mention that i try the example GettingStarted. After changing the text, the control + = didn't respond,it only can work when i enter the next detailVC.

johnno1962 commented 6 years ago

Sorry there are a few versions of injection about but the one I’m trying to move people onto is the app store one. Once you have opened a project and added the required lines to your project all you should need to do is save the file and it should inject. control + = only works in the old versions of injection. There is a short video on the injection page: http://johnholdsworth.com/injection.html