Cocoapos error - [!] Couldn't determine repo type for URL: `https://cdn.cocoapods.org/`: Non-HTTP proxy URI

Viewed 1125

I am getting

[!] Couldn't determine repo type for URL: https://cdn.cocoapods.org/: Non-HTTP proxy URI:

error during pod install when i am trying to run a flutter project.

https proxy is in place on terminal using bash profile.

Also tried to add source 'https://github.com/CocoaPods/Specs.git' in podfile but receives same error with this URL.

3 Answers

Go to Terminal and type cd ios for access ios where available pod file. And then type arch -x86_64 pod update and press enter. Now all ok, you can run your application. (Work for me 'Mac m1')

Disabling IPV6 fixes this.

To disable IPV6 on Mac OS X, do the following:

  1. Open System Preferences and click the Network icon.
  2. Select the network you are using - It will usually be labeled Wi-Fi.
  3. Click the Advanced.. button.
  4. Click the TCP/IP tab.
  5. Select the Configure IPv6 drop-down menu and set it to Link-local only.
  6. Click the OK button.

Source

The link https://cdn.cocoapods.org does not work correctly, I had to change the source in ios/Podfile as described in the code below:

  1. Change source in ios/Podfile
# platform :ios, '9.0'

source 'https://github.com/CocoaPods/Specs.git'
  1. Clean your project
flutter clean
  1. Install referenced packages
flutter pub get
  1. Run the app

The error can also come from a package which requires a version higher than '9.0' in this case it is necessary to uncomment the line # platform :ios, '9.0' and to pass for example to version '12.0' according to the version requested by the package.

Related