在将Swift类添加到旧的Xcode项目后,我得到这个错误。
dyld:库未加载:@rpath/libswift_stdlib_core.dylib
我怎样才能使项目再次运行?
在将Swift类添加到旧的Xcode项目后,我得到这个错误。
dyld:库未加载:@rpath/libswift_stdlib_core.dylib
我怎样才能使项目再次运行?
当前回答
同样的问题,对我来说,是Crashlytics/Fabric/Beta/Twitter/不管他们自称上传了一个缺少嵌入式框架的二进制文件。如果我做了一个存档,然后以标准的方式导出一个企业版,它们就很有魅力。
其他回答
如果你通过嵌入式二进制文件添加这三个框架,它们也会被添加到链接框架和库中。删除链接框架和库中的三个条目将解决问题。
像重新启动Xcode和重启Mac这样的神奇方法对我不起作用。
参考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.
通常,如果您在构建阶段中将这个库添加到“复制文件”段,这个错误就会消失。
这些解决方案似乎都不适合我;每成功运行几次之后,它就会再次失败。“嵌入式内容包含Swift代码”标志总是为我设置为“是”。
结果我将Xcode设置为6.3兼容。将其更改为3.2兼容解决了这个问题:
我的环境:Cocos2d 2.0, Box2d, Objective C
除了做上面的其他答案,我最后去了General选项卡,并使WatchKit可选。