在将Swift类添加到旧的Xcode项目后,我得到这个错误。
dyld:库未加载:@rpath/libswift_stdlib_core.dylib
我怎样才能使项目再次运行?
在将Swift类添加到旧的Xcode项目后,我得到这个错误。
dyld:库未加载:@rpath/libswift_stdlib_core.dylib
我怎样才能使项目再次运行?
当前回答
我试了上面给出的所有答案,都没用。
终于工作后更新到优胜美地
其他回答
对于在Adhoc/Enterprise发行版构建中遇到此问题的开发人员,
从开发门户创建产品证书,然后重新生成分发配置文件。下载并安装在你的Mac上。确保你在Xcode构建设置中选择了正确的配置文件,并重新构建应用程序。
来源:https://devforums.apple.com/message/1022908 1022908
如果你通过嵌入式二进制文件添加这三个框架,它们也会被添加到链接框架和库中。删除链接框架和库中的三个条目将解决问题。
像重新启动Xcode和重启Mac这样的神奇方法对我不起作用。
这些解决方案似乎都不适合我;每成功运行几次之后,它就会再次失败。“嵌入式内容包含Swift代码”标志总是为我设置为“是”。
结果我将Xcode设置为6.3兼容。将其更改为3.2兼容解决了这个问题:
我在我的项目中添加了SCLAlertView pod,后来删除了它。我没有从我的视图控制器中删除导入SCLAlertView。理想情况下,它应该给出一个编译时错误,但它给出了一个运行时错误,提到dyld: Library not loaded: @rpath/SCLAlertView.framework。我从我的视图控制器中删除了导入SCLAlertView,构建它,它没有给出错误。所以在我的情况下,我试图导入一个没有找到框架的库。删除这些引用将解决您的问题。
参考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.