[爆栈热门 iOS 问题] dyld: Library not loaded: @rpath/libswiftCore.dylib

系列文集:爆栈热门 iOS 问题。目录在此。仓薯翻译,欢迎指正:)

问题

运行 Swift 工程,控制台报错:

dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/AppName Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/Frameworks/libswiftCore.dylib: mmap() error 1 ataddress=0x008A1000, size=0x001A4000 segment=__TEXT in Segment::map() mapping/private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/APPLICATION_NAME/Frameworks/libswiftCore.dylib

答案

TALAA,278 票

我发现在 Build Settings 里有个"Embedded Content Contains Swift Code" 需要设成 YES。默认居然是 NO!

改好之后,clean 一下再重新 build。

[爆栈热门 iOS 问题] dyld: Library not loaded: @rpath/libswiftCore.dylib_第1张图片
Q6cAf.png

原文地址:dyld: Library not loaded: @rpath/libswiftCore.dylib

本文地址:http://www.jianshu.com/p/f708314957c3

系列文集:爆栈热门 iOS 问题

译者:@戴仓薯

你可能感兴趣的:([爆栈热门 iOS 问题] dyld: Library not loaded: @rpath/libswiftCore.dylib)