xcode gm ios 8 gm swift 今天扩展在模拟器和设备中崩溃:库未加载:@rpath/libswiftCore.dylib

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25774085/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 05:31:14  来源:igfitidea点击:

xcode gm ios 8 gm swift today extension crash in simulator and device: Library not loaded: @rpath/libswiftCore.dylib

iosxcodeswiftcrash

提问by ia3andy

I get this error when I run my Today extension for iOS:

运行 iOS 版 Today 扩展时出现此错误:

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /Users/andy/Library/Developer/CoreSimulator/Devices/724FF0C3-6622-4D12-865A-90244C8C63C1/data/Containers/Bundle/Application/30D8974B-ED1A-4F3A-8958-E9B7AA8901A9/App.app/PlugIns/Today.appex/Today
  Reason: image not found

I've restarted, uninstalled, installed xcode, rebooted my machine, created a fresh Today extension and I still got this error :-/

我已经重新启动、卸载、安装了 xcode、重新启动了我的机器、创建了一个新的 Today 扩展,但我仍然遇到这个错误:-/

Same problem on simulator and on device..

在模拟器和设备上同样的问题..

Do you have any idea?

你有什么主意吗?

回答by ia3andy

Build settings -> "Embeded content contains Swift Code" -> YES seems to do the trick.

构建设置 ->“嵌入的内容包含 Swift 代码” -> YES 似乎可以解决问题。

Thanks @dlinsin on twitter

感谢@dlinsin 在推特上

If still not working check this too: https://stackoverflow.com/a/25247890/2184338

如果仍然无法正常工作,请检查:https: //stackoverflow.com/a/25247890/2184338

mine is: runpath search paths

我的是: 运行路径搜索路径

edit: if still still not:

编辑:如果仍然没有:

  • Check "runpath search paths"
  • Check Linked Frameworks (I only have NotificationCenter.framework in my case)
  • Product->clean
  • Restart xcode
  • Restart machine
  • Check provisioning and signature
  • 检查“运行路径搜索路径”
  • 检查链接框架(我只有 NotificationCenter.framework 在我的情况下)
  • 产品->清洁
  • 重启xcode
  • 重启机器
  • 检查配置和签名

回答by Mark_Ss

I also met this problem, but Build settings -> "Embeded content contains Swift Code" -> YES invalid

我也遇到过这个问题,但是构建设置->“嵌入的内容包含Swift代码”->是无效