我有一个React Native应用程序,它是由fastlane通过Gitlab构建的,它给出了以下错误:
node_modules/areact native/RectCommon/yoga/yoga/YGEnums.h:10:10:双引号include";YGMacros.h";在框架标头中,应使用方括号代替[-Weror,-Wquoted include in framework header]#包括";YGMacros.h";
找到此文章:https://developer.apple.com/forums/thread/651941
.gitlab-ci.yml有以下脚本来构建IOS应用程序。
script:
- rm -rf node_modules
- nvm use
- npm install
- cd ios
- rm -rf ~/Library/Developer/Xcode/DerivedData/*
- rm -rf ~/Library/Caches/CocoaPods/
- sudo gem install bundler:1.17.2
- sudo bundle update
- sudo gem install cocoapods --pre
- bundle exec fastlane beta
看起来cocoapods安装得到了正确的版本:
$ sudo gem install cocoapods --pre
Successfully installed cocoapods-1.10.0.rc.1
Parsing documentation for cocoapods-1.10.0.rc.1
我仍然得到双引号错误
通过将其放入ios文件夹中的Gemfile修复:宝石'cocoapods','1.10.0.rc.1'
感谢@PaulBeusterien的提示。
- 查找pod,打开buildsettings
- 搜索引用的内容包括
- 将此属性设置为"否">