ios原生项目集成React-Native,按React-Native中文网教程走,因为是新版本0.54.4的React-Native,中间遇到React-Native依赖库安装总是失败,其中一条错误提示:SDK "iPhoneOS" cannot be located
坑呀,各种百度,找到解决链接:https://blog.csdn.net/woaizijiheni/article/details/50614062,记录如此,主要是Xcode路径不对,根本原因是我之前安装个两个Xcode,
xcode-select --print-path
/Library/Developer/CommandLineTools
$ xcodebuild -showsdks
xcode-select: error: tool ‘xcodebuild‘ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools‘ is a command line tools instance
修改路径正确命令行 $ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
搞定,
另今天导入React-Native,练习,完成后发现运行项目总是提示folly/folly-config.h 找不到,苦逼的试了好几次,依旧报错,后尝试package.json中把React-Native版本修改降到0.54,重新npm install,然后pod install,项目才算编译成功,,,