Closed linshiqing closed 5 years ago
Is this an Objective-C project?
No, it is a Swift project。 It is "GettingStarted" from your website http://johnholdsworth.com/injection.html。 The Xcode Version is 10.2.1。 No matter Swift or Oc project I run, "dlopen" the bundle always get the similar result。 Could you give a version which has been adaptive to the Xcoe 10.2.1,thks!
The version in the App store is adapted fro 10.2* Which bundle are you loading. It should be the one without the “10” suffix.
The bundle with "10" suffix still not success。 Error loading /Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle/iOSInjection10: dlopen(/Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle/iOSInjection10, 265): Symbol not found: _$SBOWV Referenced from: /Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle/iOSInjection10 Expected in:
I’m not able to replicate your problem. Is your Xcode 10.2.1 at the path /Applications/Xcode.app?
Yes,the path is /Applications/Xcode.app。 I download the app from the AppStore and run the command "[[NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle"] load];" again, it works and success , but if I modify the bundle to "iOSInjection10.bundle" it failed with the log ->" Error loading /Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle/iOSInjection10: dlopen(/Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle/iOSInjection10, 265): Symbol not found: _$SBOWV Referenced from: /Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle/iOSInjection10 Expected in: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftCore.dylib in /Applications/InjectionIII.app/Contents/Resources/iOSInjection10.bundle/iOSInjection10"
/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle is the path you want to be using.
thks and I have another question :which is the Injection's latest version 1.5.2 ? Should we use InjectionIII or InjectionX。
Sorry, you must have downloaded from the out of date link in the README.md. The most recent pre-release version is here: https://github.com/johnno1962/InjectionIII/releases/tag/1.5.2 (with a fix for storyboard injection on 10.2) but the App Store version is the supported version.
I see,thank you for your patience and explanation .
Bundle(path: "/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle")!.load()
Error loading /Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle/iOSInjection: dlopen(/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle/iOSInjection, 265): Symbol not found: _OBJCCLASS$_SwiftObject Referenced from: /Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle/iOSInjection Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftCore.dylib in /Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle/iOSInjection