不打包直接真机调试正常,打包成ipa后安装调试闪退的解决方法

当项目是Swift和OC混编的时候,在模拟器或者真机调试都正常运行,但是打包成ipa文件安装在手机上运行的时候启动就闪退,解决办法:
在Build settings里面找到Embeded content contains Swift Code选项,工程默认是NO,将其修改成YES问题就解决了

Paste_Image.png

参考资料:
https://developer.apple.com/library/content/qa/qa1881/_index.html

http://stackoverflow.com/questions/25774085/xcode-gm-ios-8-gm-swift-today-extension-crash-in-simulator-and-device-library-n

http://stackoverflow.com/questions/24002836/dyld-library-not-loaded-rpath-libswift-stdlib-core-dylib/25247890#25247890

你可能感兴趣的:(不打包直接真机调试正常,打包成ipa后安装调试闪退的解决方法)