我是ios /
xcode世界的新手,并尝试在运行iOS v8.0.2的
iphone 5上测试一个简单的
Swift应用程序.该应用程序在xcode(版本6.1(6A1052d))中成功构建,但当它尝试在iphone上运行时,它崩溃并出现以下错误:
dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/prox Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x001FA000,size=0x001A0000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/Frameworks/libswiftCore.dylib /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x004DA000,size=0x001A0000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/Frameworks/libswiftCore.dylib (lldb)
我已经尝试过大多数建议,这些建议帮助了遇到此错误的其他人,但却没有运气.使用其他团队成员的构建环境构建时,相同的应用程序工作正常.我比较了构建设置,发现它们是相同的.
解决方法
尝试创建新的分发证书和新的配置文件.它可能与此有关.我遇到了这个问题.
https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/
基本上,Apple为证书添加了一个新领域,并没有以任何明确的方式告诉我们.