项目中 添加 swift代码 真机调试 错误

时间:2023-12-20 18:41:14

错误:

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 at
address=0x008A1000, size=0x001A4000 segment=__TEXT in Segment::map() mapping
/private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/APPLICATION_NAME/Frameworks/libswiftCore.dylib

 解决办法:

step1.

项目中 添加 swift代码 真机调试 错误

step2.

clean(commend+shift+k)以下项目

完成以上两步 就大功告成了

-----------------------------------------------------------------------------------------------------------------------------

参考地址:http://*.com/questions/26024100/dyld-library-not-loaded-rpath-libswiftcore-dylib