johnno1962 / InjectionIII

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

Can't launch builds from Xcode 15 beta #454

Closed JacobSyndeo closed 1 year ago

JacobSyndeo commented 1 year ago

When trying to run a build made using Xcode 15 beta, the app crashes on launch with the following message in the console:

dyld[63708]: Symbol not found: section$end$__DATA$__llvm_prf_vnds
  Referenced from: <[UUID]> /Users/[me]/Library/Developer/Xcode/DerivedData/[my app]-ffhgkgubebddiccmqlcnzrfhwidu/Build/Products/Debug/[my app]/Contents/MacOS/[my app]
  Expected in:     <[exact same UUID]> [exact same path as above]

Meanwhile, it (usually) works just fine when built using Xcode 14.

johnno1962 commented 1 year ago

Hi, I'm not seeing that at the moment but the error rings a bell but I can't remember what I did to make it go away. What beta Xcode version is this/which iOS/app version etc. Have you tried a build clean? Do you have test coverage enabled are few things you could try. Is this using the HotReloading Swift Package? You could try using one of the injection bundles from the app or vice versa.

JacobSyndeo commented 1 year ago

Thanks for the reply!

EDIT: Disabling code coverage gathering (even though that's in the Test section, not the Run section) now allows the app to launch and run from Xcode 15! (At least using the HotReloading package. Presumably this fixes the issue when using the standard bundle-loading method as well.)

So it's working now to the point where I can develop with it, but I wonder why the issue doesn't arise on Xcode 14.

johnno1962 commented 1 year ago

Can you try without code coverage? This sort of symbol is often related to that. When it doesn't find your build logs you should just be able to edit a file and rebuild to refresh them rather than having to clean/rebuild or delete DerivedData. Just seen your edit; It's always code coverage that trips things up. Who knows what the issue is with Xcode 15. We'll have to see if it resolves itself by the time they do a final release.

johnno1962 commented 1 year ago

Closing this as there is a workaround of not gathering code coverage. Is this still a problem with the Xcode 15 release candidate?