在将Swift类添加到旧的Xcode项目后,我得到这个错误。

dyld:库未加载:@rpath/libswift_stdlib_core.dylib

我怎样才能使项目再次运行?


当前回答

在我的情况下,我只是使用“Cmd+Shift+K”,然后“Cmd+B”运行它的工作

其他回答

我试了上面给出的所有答案,都没用。

终于工作后更新到优胜美地

升级到OS X的最新版本(Yosemite)

经过几个小时的反复试验,我终于找到了这个问题的解决办法。 -当然,如果这适用于你的情况。

我也有同样的问题,直到我把我的Mac OS X从Mavericks升级到Yosemite。 -它解决了我的问题,希望它也能解决你的问题

在我的例子中,我试图导入一个自定义框架,并得到类似的错误。 结果我不得不在嵌入式二进制文件中导入框架,而不是在链接框架和库中。

嵌入式二进制文件在项目设置-> ->通用下

参考https://forums.developer.apple.com/thread/21292

这个解决方案对我很有效:

It occurred on my side when building an app in the command line via xcodebuild and xcrun PackageApplication, signing the app with an enterprise profile. On our CI build servers, the certificate was set to "Always Trust" in the keychain (select certificate -> Get Info -> Trust -> "Use System Default" can be changed to "Always Trust"). I had to set it back to "Use System Default" in order to make this work. Initially we set this to "Always Trust" to work-around the keychain dialogs that appear after software updates and certificate updates.

在我的情况下,我只是使用“Cmd+Shift+K”,然后“Cmd+B”运行它的工作