3

I've got a react-native app that builds on AppCenter. I have a Podfile in my /ios directory, and locally, I can run pod install. The AppCenter documentation says that "App Center scans the selected branch and if it finds a Podfile, it will automatically do a pod install step at the beginning of every build. This will ensure that all dependencies are installed.", but as far as I can tell, it's not running pod install for my build and the build fails for that reason.

Tried adding pod install to a pre-build script, in which case the build succeeds.

Octodone
  • 515
  • 6
  • 13

2 Answers2

3

It appears that in addition to having a Podfile, you must NOT have a ios/Pods folder present in the remote. In my case, I also had to explicitly add that folder to my .gitignore

OhadM
  • 4,687
  • 1
  • 47
  • 57
caike
  • 8,769
  • 2
  • 19
  • 10
3

Make sure the Cocoapods version running on the build agent matches the one on your podfile.lock.

You can add a post clone script like this on your ios/ folder:

appcenter-post-clone.sh This will automatically install the matching cocoapods version.

Push that file to your repo, then make sure you open the build configuration and hit Save and Build.

GucaTEC
  • 539
  • 5
  • 5