johnno1962 / injectionforxcode

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

InjectionX.app Not work #282

Closed WangGuibin closed 4 years ago

WangGuibin commented 4 years ago

Error loading /Applications/InjectionX.app/Contents/Resources/iOSInjection.bundle/iOSInjection: dlopen(/Applications/InjectionX.app/Contents/Resources/iOSInjection.bundle/iOSInjection, 265): Symbol not found: _$SBOWV Referenced from: /Applications/InjectionX.app/Contents/Resources/iOSInjection.bundle/iOSInjection Expected in: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib in /Applications/InjectionX.app/Contents/Resources/iOSInjection.bundle/iOSInjection

WangGuibin commented 4 years ago

Xcode Version 10.1 (10B61)

johnno1962 commented 4 years ago

Hi, for Xcode 10.1 you need to load /Applications/InjectionX.app/Contents/Resources/iOSInjection10.bundle

WangGuibin commented 4 years ago

This is a pit dug by myself. I installed two versions of Xcode and changed the name, which means the path has changed, so I can't link it.

xcode-select -print-path
/Applications/Xcode10.1.app/Contents/Developer

I am now back. rename Xcode 10.1.app => Xcode.app ,then

sudo xcode-select -switch  /Applications/Xcode.app/Contents/Developer

The world is getting better~ Still the previous code can run

#if DEBUG
    //UI hot reload
    [[NSBundle bundleWithPath:@"/Applications/InjectionX.app/Contents/Resources/iOSInjection.bundle"] load];
#endif    
johnno1962 commented 4 years ago

Where are you getting InjectionX.app from? The supported version is InjectionIII in the mac App Store.

WangGuibin commented 4 years ago

The souce from network ,link for https://www.jianshu.com/p/a049fa394575

johnno1962 commented 4 years ago

That is a very old version and not the primary source. Please use InjectionIII from the Mac App Store. It's free.

WangGuibin commented 4 years ago

OK ! I really appreciate the open source spirit of the author~ I will change the latest one immediately.