macOS project failing on runtime

108 Views Asked by At

So I have an xcode project that fails every time I run it on my computer. Works on other computers though. I get the following error:

dyld: Library not loaded: /System/Library/PrivateFrameworks/Swift/libswiftCoreFoundation.dylib

Now, when I look in /System/Library/PrivateFrameworks/Swift/ I can't find the libswiftCoreFoundation.dylib file. But other swift projects work just fine. I have no idea how to fix this. I've tried cleaning, restarting my computer, creating a copy of the project, updating Xcode, updating command line tools, everything I could think of.

The project was working just fine a few hours ago. Something went wrong by itself. No clue how to fix things.

1

There are 1 best solutions below

2
On BEST ANSWER

After spending 6 straight hours debugging and trying to fix things, I found the solution. For some reason, my "Library Search Paths" was filled with the wrong directory. I never set it to that directory. But it was set.

Here is what I mean:

LSP

The highlighted field was filled with the following: macosx/System/Library/PrivateFrameworks/Swift

I just took that out. I hope this helps save some future traveler the pain and torture I went through