關鍵字1:dyld: Library not loaded: /usr/lib/libstdc++.6.dylib Referenced from:
關鍵字2:Reason: no suitable image found. Did find:
/usr/lib/libstdc++.6.dylib: mach-o, but not built for iOS simulator
升級到Xcode10 之后,相信大家遇到這樣的報錯都很屬於很常見的了,下面就告訴大家相關的操作方法:
參考鏈接:https://blog.51cto.com/14357084/2402307?source=dra
其中作者在下圖這一步操作的時候,好多不仔細的同志都可能入坑
文件路徑: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/
注意:這步操作的后綴很容易默認進入到 libexec 文件下,因為很多時候模擬器有啥傻乎乎,而且該級目錄下有兩個以 lib 開頭的文件,我們需要將那三個缺失的相關內庫文件添加到 lib 文件下,而不是 libexec。這一步也是解決本文 關鍵字2 的有效方法。
其它步驟按鏈接的文章中來,本人也花了大半天的時間親測,很有效,有不同觀點或者更好方法的大牛,歡迎評論區指正和討論!