问题1: Command phasescriptexecution failed with a nonzero exit code,export PATH="/opt/homebrew/bin:$PATH" # 兼容homebrew安装的cmake
解决方案:
使用Homebrew安装CMake:
brew install cmake
cmake --version
问题2:iOS 14及以下系统启动崩溃报错:Dyld:Symbol not found: __ZTTNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE,expected in ‘/usr/lib/libc++.1.dylib’
分析:由于项目中用到libc++系统库,但在iOS 14及以下没有stringstream这个API,修改C++代码替换为std::to_string + std::string实现
解决方案:修改C++代码中运用的stringstream替换为std::to_string + std::string实现可解决