johnno1962 / injectionforxcode

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

Loading bundle issue for swift project #62

Closed JackieQi closed 8 years ago

JackieQi commented 8 years ago

@johnno1962 First, i want to thank you for the brilliant work. I had an issue loading the bundle. So i set up the project according to the document. Everything works fine. But when i inject source file, then i keep seeing this in the console. 2015-10-20 23:41:45.461 PEPConcierge[65151:4104218] Injection attempting connection to: 127.0.0.1:31442 2015-10-20 23:41:45.465 PEPConcierge[65151:4104218] Connected to "Injection" plugin, ready to load x86_64 code. Compiling /Users/jackieqi/concierge-app-ios/PEPConcierge/PEPConcierge/Classes/Views/PEPOrderListTableViewCell.swift objc[65151]: Class _TtC12PEPConcierge25PEPOrderListTableViewCell is implemented in both /Users/jackieqi/Library/Developer/CoreSimulator/Devices/F68C882E-C84B-4BD5-AF7A-D099D148FB25/data/Containers/Bundle/Application/9EEDEFB6-5E42-4813-97A7-727AFF836CA6/PEPConcierge.app/PEPConcierge and /Users/jackieqi/concierge-app-ios/PEPConcierge/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle2.bundle/InjectionBundle. One of the two will be used. Which one is undefined. 2015-10-20 23:41:46.282 PEPConcierge[65151:4103943] Swizzled PEPConcierge.PEPOrderListTableViewCell 0x11a44dbb0 -> 0x104c70480

So every time, there will be two bundles created and xcode doesn't know which one to load, so the modification couldn't be applied. Please advise. Thanks very much for the help in advance. Btw, the injection console looks good, everything is successful.

johnno1962 commented 8 years ago

Hi, You can ignore this message. It’s new to iOS 9. Injection will be using the new version correctly.