我有一个 RN 0.61.2 应用程序,过去已在应用程序中心成功构建 >55,但目前无法在 AppCenter 中构建。我不断收到错误消息,提示找不到 Pod 文件。
我尝试过运行 Pod Install。删除所有 Pod,然后重新安装。 这是我的 Pod 文件的示例
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'ABAPortal' do
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
// Sample from my Pod File
end
我的一些错误。所有这些都与我的 podfile 相关联。
[command]/usr/bin/xcodebuild -workspace /Users/vsts/agent/2.158.0/work/1/s/ios/ABAPortal.xcworkspace -scheme ABAPortal archive -archivePath /Users/vsts/agent/2.158.0/work/1/output/build/archive/ABAPortal CODE_SIGN_STYLE=Manual
User defaults from command line:
IDEArchivePathOverride = /Users/vsts/agent/2.158.0/work/1/output/build/archive/ABAPortal
Build settings from command line:
CODE_SIGN_STYLE = Manual
note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: /Users/vsts/agent/2.158.0/work/1/s/ios/Pods/Target Support Files/boost-for-react-native/boost-for-react-native.xcconfig: unable to open file (in target "boost-for-react-native" in project "Pods") (in target 'boost-for-react-native')
Build system information
error: /Users/vsts/agent/2.158.0/work/1/s/ios/Pods/Target Support Files/FBLazyVector/FBLazyVector.xcconfig: unable to open file (in target "FBLazyVector" in project "Pods") (in target 'FBLazyVector')
编辑以防其他人遇到此问题。如果您的项目中已有 Pod 文件夹。 AppCenter 将不会运行 pod install。所以你可能会遇到问题。
最佳答案
AppCenter 将像往常一样执行 pod install
命令,但这只有在删除 ios/Pods
时才有效。由于最新的 RN 版本(未被 git 忽略),文件夹已经存在。
我们的团队必须这样做:
- 删除
ios/Pods
gitignore 文件中的行(自 RN 0.61 起 git-ignored)。 - 删除
ios/Pods
文件夹。 - 提交
- 重新添加
ios/Pods
在 gitignore 文件中 - 提交
- AppCenter 的构建将正常运行
注意:从分支切换时本地也必须执行此步骤 RN<0.61
至RN>0.61
.
希望对你有帮助
关于xcode - 为什么我的 RN 61 IOS 在 AppCenter 中构建构建失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58377446/