johnno1962 / InjectionIII

Re-write of Injection for Xcode in (mostly) Swift
MIT License
4.07k stars 319 forks source link

xcode14.3.1,load InjectionIII.bundle fail #451

Closed ljw215 closed 1 year ago

ljw215 commented 1 year ago

Error loading /Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle/iOSInjection (82): dlopen(/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle/iOSInjection, 0x0109): Symbol not found: _$sSS10SwiftTraceE11OffsetIndexO4lastyACSS_S2btcACmFWC Referenced from: <1FAE89F4-20E6-371C-BF50-CA1C23E5C62E> /Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle/iOSInjection Expected in: <3AA40D4A-23E2-38EE-8165-7D75AEB21390> /Users/liujingwei07/Library/Developer/Xcode/DerivedData/youjia-bomzmqhebcqctkemnaocooqsxbte/Build/Products/Debug-iphonesimulator/PackageFrameworks/SwiftTrace.framework/SwiftTrace

johnno1962 commented 1 year ago

Hi, Have you been using the HotReloading Swift Package? You get this problem when you switch from using the package to using the bundle. You should just be able to remove /Users/liujingwei07/Library/Developer/Xcode/DerivedData/youjia-bomzmqhebcqctkemnaocooqsxbte/Build/Products/Debug-iphonesimulator/PackageFrameworks/SwiftTrace.framework or do a clean build and try again.

ljw215 commented 1 year ago

yes, I have used HotReloading Swift Package, It's also used on Appdelgate [[NSBundle bundleWithPath:@"/Applications/InjectionIII.app/Contents/Resources/iOSInjection.bundle"] load], did they have a conflict? Should I remove one of them?

ljw215 commented 1 year ago

when I remove HotReloading Swift Package, iOSInjection.bundle can load success

johnno1962 commented 1 year ago

it's just something that happens when there is a SwiftTrace.framework left around by the HotReloading build which is incompatible with that used by the bundle as they are built slightly differently. In short, once you have been using HotReloading package you need to build clean before you can use the bundles.