基本上安照官方文档走,安装 node homebrew watchman ruby(版本号对应) 以及对应管理器(rbenv),以及最后的 cocoapods安装
最后 到创建项目时 出现 cocoapods denpendcy install 失败 ,具体看失败的原因:
JSON::ParserError - Failed to parse JSON at file: '/Users/sun/.cocoapods/repos/trunk/Specs/1/d/4/CocoaAsyncSocket/7.6.3/CocoaAsyncSocket.pod spec.json'.
对应查看资料:
sudo rm -rf ~/.cocoapods/repos 进行删除,最后重新几次pod install,可能需要使用到vpn
同时注意---如果git 配置了代理一定要进行删除彻底,
git config --global --unset http.proxy
git config --global --unset http.https://github.com.proxy
进入到 ~/.gitconfig 手动删除
整个安装过程 经历的几天。
最后借鉴了:
https://www.jianshu.com/p/b2442a616c62
https://www.jianshu.com/p/190d2ad554a9
https://zhuanlan.zhihu.com/p/376754036