Dreaded "dyld: Library not loaded: @rpath/libswiftCore.dylib"... with 8b3 on simulator?

I get this when I try to run a project on the Xcode 8.0 beta 3 (8S174q) Simulator:


dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /Users/dilabuser/Library/Developer/CoreSimulator/Devices/6D3900E4-86A4-46FB-BFC6-F4472F5A4DEA/data/Containers/Bundle/Application/180C0C55-5E65-4EE8-8BD7-3A6029A13307/Scaffold.app/Scaffold
  Reason: image not found


Googling this error message turns up a bunch of 2015-era advice about signing, most saying that it works fine on the simulator but then fails on device. I get this message on the simulator, after logging out of all my accounts and not signing at all.


Any ideas what might be wrong or how to continue debugging?

Perhaps crack open a compiled build of the app to see if libswiftCore.dylib is actually present inside the bundle? It should be in Contents/Frameworks along with a ton of other libswift items.

I'm seeing the same issue on the simulator (and device). My Contents/Frameworks has no libswift*.dylib binaries.

I logged out of iTunes Connect and logged back in, to the point where Xcode thought it had sorted out all the signing stuff and I could Archive with a "build only device". Cracking open that .app file showed me no libswift*.dylib, where another trivial example project I just created does.


So Xcode thinks it's not a Swift project for some reason and isn't copying over the libraries? Any idea where I could start looking?

Your idea of Xcode not realizing that it's a Swift project sounds like a good possibility—I vaguely remember sorting out a similar issue myself a few months ago. (Alas, I can never remember exactly what I did to fix it!) I would recommend checking the build settings to see if the special Swift compiler stuff is present. There should be sections in the settings clearly marked with "Swift Compiler."

"Always embed Swift standard libraries" was set to NO, but setting it to YES didn't help anything :-(


Submitted rdar://27546404

After you switched it to YES, did you clean your project and rebuild? Use Cmd-Opt-Shift-K to erase the whole build products folder; next time you hit Build and Run it will recompile the whole thing from scratch. Maybe it'll work then?

Yup, did that.


Also, the fresh project I created to compare has "Always embed..." set to NO, and works. So I've no idea what's going on.

Aha, I'm posting in the wrong forum apparently—there's one specifically for the betas.


Many other people are having the same problem. That last link points to a thread on the GitHub Carthage issues page which suggests a work-around.

Any other differences between that fresh project and your own?

Sorry, I'd already followed up on this thread but the asinine moderation policy apparently means that posts with links to external solutions aren't allowed.

Many other people are having the same problem. There is a thread on the GitHub Carthage issues page which suggests a work-around.

Hi - I managed to solve this


Hi - none of these solutions seemed to work but when I changed the permission of the world Wide Developer cert to `Use System defaults` then it worked.

I have included the steps and screenshots in the link below


I would encourage you to log the ticket in apple bug report as mentioned: http://stackoverflow.com/a/41401354/559760 as Apple really should solve this massive error:

Dreaded "dyld: Library not loaded: @rpath/libswiftCore.dylib"... with 8b3 on simulator?
 
 
Q