swift code crash ,log : dyld: Library not loaded: @rpath/libswiftCore.dylib
我调试了一个简单的Swift应用程序,它可以正常运行在模拟器上,但在真正的机器上运行时会立即崩溃。
系统版本,iOS 8Xcode版本,6.0.1
事故日志
dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from:
/private/var/mobile/Containers/Bundle/Application/002E2F03-EE10-433B-B95F-AE3760E777DA/sMdp.app/sMdp
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/002E2F03-EE10-433B-B95F-AE3760E777DA/sMdp.app/Frameworks/libswiftCore.dylib:
mmap() error 1 at address=0x100104000, size=0x00194000 segment=__TEXT
in Segment::map() mapping
/private/var/mobile/Containers/Bundle/Application/002E2F03-EE10-433B-B95F-AE3760E777DA/sMdp.app/Frameworks/libswiftCore.dylib
选择"使用系统缺陷"选项。
This issues seems to be caused by the certificate.苹果将组织单位填写在证书上。所以你需要申请一个新的证书将填充场,您的应用程序将预先工作。
资料来源(和对这些人的信用):HTTPS://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/