美文网首页
新版 Xcode运行之前的项目提示library not fou

新版 Xcode运行之前的项目提示library not fou

作者: canlanrensheng | 来源:发表于2019-01-17 15:28 被阅读0次

更新Xcode后,部分项目依赖 libstdc++.6.0.9 的会在Xcode 10无法运行,比如之前集成过百度地图。

其原因是Xcode 10中将libstdc++.6.0.9库文件删除,原本功能迁移至其他库。

解决方案:

1、下载stdc++.6.0.9

https://github.com/canlanrensheng/libstdc-.6.0.9

2、下载后把真机运行库放在新装的Xcode目录下:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib

把模拟器运行库放在新装的Xcode目录下:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib

替换完成后在模拟器iOS10.0以上运行会出现一个错误:

Reason: no suitable image found.  Did find:    /usr/lib/libstdc++.6.dylib: mach-o, butnotbuiltforiOS simulator

3、把下载的libstdc++.6.dylib放在新版的Xcode目录下:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/

4、最后重启Xcode就OK了。

相关文章

网友评论

      本文标题:新版 Xcode运行之前的项目提示library not fou

      本文链接:https://www.haomeiwen.com/subject/eiyidqtx.html