Why does my RN 61 IOS fail build to build in AppCenter?

Viewed 843

I have a RN 0.61.2 app that has successfully built in the past >55 in App center but it currently will not build in AppCenter. I keep getting errors saying it can't find Pod Files.

I have tried running Pod Install. Removing all Pods then reinstalling them. Here is a sample of my Pod File

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

A couple of my many errors. All are associated with my 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')

Editing in case anyone else has this problem. If you have a Pod Folder already in your project. AppCenter will not run pod install. So you may have problems.

2 Answers

AppCenter will do, as usual, a pod install command, but this will only work if you remove the ios/Podsfolder aleady present due to last RN version (wasn't git-ignored).

Our team had to do this:

  • remove ios/Pods line from the gitignore file (git-ignored since RN 0.61).
  • remove the ios/Pods folder.
  • commit
  • re-add ios/Pods in the gitignore file
  • commit
  • the AppCenter's build will work

Notice: this steps are also mandatory locally when switching from branches RN<0.61 to RN>0.61.

I hope it will help you

In react-native starting from 0.60, there were a lot of breaking changes. First of all, they introduced autolinking. Refer to this guide for migration.

Related