Apple在iOS12中取消了對stdlic++的支持
臨時的解決方案是將老版本的Xcode中的文件copy到新版Xcode的目錄中c++
模擬器
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/
須要說明的是,iOS12模擬器即便添加了這個文件仍然不支持libstdc++,須要低於iOS12版本的模擬器才能正常使用app
真機
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/code