Cocoapods error while running ios app which leads error in pod install


I am trying to create both ios and android app and It works fine for android but for ios while running flutter run it will take lot of time installing pod using pod install and at last it will give an error as shown below.

Error output from CocoaPods:
         Cloning into
         fatal: unable to access '': Failed to
         connect to port 443: Connection refused
Error running pod install
Error launching application on iPhone 12 Pro Max.

I tried these posts but no luck
error running pod install
error running pod install pods-runner


    sdk: flutter
  cupertino_icons: ^1.0.2
  image_picker: ^0.6.7+17
  firebase_ml_vision: ^0.9.10
  image_cropper: ^1.4.0
  firebase_core: ^0.3.4
  cloud_firestore: ^0.9.13+1
  expandable: ^5.0.1

If any extra information needed, Let me know in comments


After many research I found a solution,

Step 1: I removed all cocoapods and it’s directory using

gem list --local | grep cocoapods
sudo gem uninstall EACH_OF_THEM  // here EACH_OF_THEM means all the listed cocoapods
rm -rf ~/.cocoapods

Step 2: Installed HomeBrew

/bin/bash -c "$(curl -fsSL"

Step 3: Install cocoapods using HomeBrew

brew install cocoapods

Step 4: remove Podfile.lock if present

cd ios
rm Podfile.lock

Step 5: Now install pod

pod install --repo-update

It will take lot of time to download and install all the dependencies.

Now, If I run flutter project using flutter run. It succeed

Running pod install...
Running Xcode build...

refered link :

Answered By – Shashank Gb

Answer Checked By – Clifford M. (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.