In ionic appFlow how use COCOAPODS 1.12.1

MIGRATING CORDOVA TO CAPACITOR. IN IONIC APPFLOW BUILD GOES TO FAILD BECAUSE OF CocoaPods.

CocoaPods = 1.12.0 IS NOT INSTALLING IN MACBOOK

try:

  1. Uninstall Ruby with: brew uninstall ruby --force
  2. Uninstall CocoaPods. At first, try to list all CocoaPods versions / components with gem list --local | grep cocoapods. Then uninstall them one by one, in my case:

sudo gem uninstall cocoapods

sudo gem uninstall cocoapods-core

sudo gem uninstall cocoapods-downloader

etc.

  1. As a next step I was able to reinstall ffi and then CocoaPods with:

sudo arch -x86_64 gem install ffi

sudo arch -x86_64 gem install cocoapods

Once done, I could run pod install as expected.
(maybe you will need to run pod update before)

its working in local machine but in ionic appflow same issue is showing.

:heavy_multiplication_x: Updating iOS native dependencies with pod install - failed!
[07:19:57]: ▸ :heavy_multiplication_x: update ios - failed!
[07:19:57]: ▸ [error] Analyzing dependencies
[07:19:57]: ▸ Adding spec repo trunk with CDN https://cdn.cocoapods.org/
[07:19:57]: ▸ CocoaPods 1.12.1 is available.
[07:19:57]: ▸ To update use: gem install cocoapods
[07:19:57]: ▸ For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at Release 1.12.1 · CocoaPods/CocoaPods · GitHub

in podfile.lock
this is my COCOAPODS version COCOAPODS: 1.12.0
platform :ios, ‘13.0’

This is a known bug on appflow, since the Podfile.lock is now committed in Capacitor 5 projects, pod install is failing when the local CocoaPods version doesn’t match the appflow’s CocoaPods version.

There are a few workarounds:

  • Don’t commit Podfile.lock
  • Make your local CocoaPods version match the appflow version
  • Manually edit the Podfile.lock CocoaPods version to match the appflow version (this way you can still use latest locally if you are using Xcode 14.3, but then change the version before building from appflow so it works there)

Other than that you’ll have to wait until there is a new appflow build stack with latest CocoaPods and/or a fix for the mismatch in CocoaPods versions.

1 Like

Thank you for response.