在将Swift类添加到旧的Xcode项目后,我得到这个错误。
dyld:库未加载:@rpath/libswift_stdlib_core.dylib
我怎样才能使项目再次运行?
在将Swift类添加到旧的Xcode项目后,我得到这个错误。
dyld:库未加载:@rpath/libswift_stdlib_core.dylib
我怎样才能使项目再次运行?
当前回答
我在使用带有生产证书的Ad Hoc(或企业)移动设备时遇到了这个问题。切换到开发证书和移动供应解决了这个问题。
其他回答
在我的例子中,我试图导入一个自定义框架,并得到类似的错误。 结果我不得不在嵌入式二进制文件中导入框架,而不是在链接框架和库中。
嵌入式二进制文件在项目设置-> ->通用下
参考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代码标志为YES。
我也遇到过同样的问题,设置正确的代码签名标识解决了这个问题(构建设置->代码签名标识)。
根据苹果的技术问题,“iOS 8发布后创建的所有企业和标准iOS开发者证书在适当的位置都有新的团队ID字段,以允许Swift语言应用程序运行”
同样的问题,对我来说,是Crashlytics/Fabric/Beta/Twitter/不管他们自称上传了一个缺少嵌入式框架的二进制文件。如果我做了一个存档,然后以标准的方式导出一个企业版,它们就很有魅力。