Craig Otis Craig Otis - 1 year ago 93
Swift Question

Unable to load Swift runtime library (image not found)

I updated one of my core frameworks to use Swift as an experiment. It builds fine, the compatibility header has the Swift classes available to the Objective-C classes that depend on them, and everything compiles fine.

However, when launching the application (base SDK and deployment target

OS X 10.10
) it crashes immediately with:

dyld: Library not loaded: @rpath/libswift_stdlib_core.dylib
Referenced from: /Users/Craig/Library/Developer/Xcode/DerivedData/MacApp-dxcgahgplwpbjedqnembegifbowj/Build/Products/Debug/Fluffy.framework/Versions/A/Fluffy
Reason: image not found

Note that
is the application I'm launching, and it uses the
framework containing Swift code.

project has its
Runpath Search Paths
set to:


But I have also tried it blank. I have tried restarting Xcode, to no avail. Using Yosemite 14A298i and Xcode beta 4.

Answer Source

The Runpath Search Paths for my framework (Fluffy) containing the Swift code needed to be updated. It originally contained:


But after creating a sample Swift project and comparing the build settings, Xcode was adding:


To the newly-created project. This was missing from my existing framework project. Adding it so the Runpath Search Paths contained these values solved the problem:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download