johnno1962 / injectionforxcode

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

Simulator not updating #165

Open ghost opened 8 years ago

ghost commented 8 years ago

Hello great product, I'm still trying to use it. I'm currently using swift when i patch my project I have to manually create a main.m when i try for objective-c I do not have to manually create it it does it automatically. just though I would mention that. The problem im having is when i upd via command+ = not update is made to simulator. after install the app was restarted and simulator was restarted. Im not sure if im missing any steps. Thank you in advance.

xcode log:

"2016-09-04 10:37:12.960 asfasf[23938:341804] +[BundleInjection load] 192.168.0.3 (see project's main.(m|mm) 2016-09-04 10:37:12.966 asfasf[23938:341993] Injection attempting connection to: 127.0.0.1:31442 2016-09-04 10:37:12.969 asfasf[23938:341993] Connected to "Injection" plugin, ready to load x86_64 code. Compiling /Users/lightning/Desktop/asfasf/asfasf/ViewController.swift objc[23938]: Class _TtC6asfasf14ViewController is implemented in both /Users/lightning/Library/Developer/CoreSimulator/Devices/3AA7DD8D-97A9-45FD-BBEC-24937022C8FF/data/Containers/Bundle/Application/5606296D-C347-46E5-A8E2-40C1A5AD479C/asfasf.app/asfasf and /Users/lightning/Desktop/asfasf/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle/InjectionBundle. One of the two will be used. Which one is undefined. 2016-09-04 10:37:28.069 asfasf[23938:341804] Ignore any warning, Swizzled asfasf.ViewController 0x112a1e440 -> 0x1022ea608 15 injections performed so far."

johnno1962 commented 8 years ago

are you calling -viewDidLoad etc after injection to reload the view?

ghost commented 8 years ago

After injection I rebuild the the run to make sure the simulator is refreshed. Please take a look at the video of the step i followed. https://drive.google.com/open?id=0Bz0PtVSH_IkgcU5HSGRMQjhOYjQ

johnno1962 commented 7 years ago

Just in time for Christmas I’ve been able to releaes a new binary version of Injection which makes getting up and running a breeze http://johnholdsworth.com/injection.html. If you have any problems please report them on it’s support repo https://github.com/johnno1962/InjectionApp. Happy Holidays! πŸŽ…πŸ·πŸŽ„β˜ƒ