在升级Xcode到XCode10/11 beta之后,项目报错 “‘String’ file not found”
#include <String> //file not found
上述代码会报错“ ‘String’ file not found”,查阅相关资料,最终通过如下方法解决:
1.在Targets -> “Build Phases” -> “Link Binary with Libraries” 中添加 libc++.tbd
2.将"Build Settings" -> Apple Clang - Language - C++ -> “libstdc++ (GNU C++ standard library)” 改为"libc++ (LLVM C++ standard library with C++11 support)"