'How to fix cocoapods trunk cdn issue?

I am trying to setup a react-native app from scratch. During install, I get the following error

Analyzing dependencies Fetching podspec for DoubleConversion from ../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec Fetching podspec for Folly from ../node_modules/react-native/third-party-podspecs/Folly.podspec Fetching podspec for glog from ../node_modules/react-native/third-party-podspecs/glog.podspec Adding spec repo trunk with CDN https://cdn.cocoapods.org/ [!] Unable to add a source with url https://cdn.cocoapods.org/ named trunk. You can try adding it manually in /Users/sachinchandorkar/.cocoapods/repos or via pod repo add.

I have tried installing the pod manually without success



Solution 1:[1]

I just had this issue and there was a cdn issue with cocoapods so visit. https://status.cocoapods.org/# and see if everything is working alright first

Solution 2:[2]

This helped..
In terminal execute command chflags -R nouchg .

Solution 3:[3]

Could you please check if the XCode CLI is selected properly.

Xcode --> Preferences --> Locations --> Command Line Tools:

enter image description here

Then run pod install or pod update

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 P-A
Solution 2 dbc
Solution 3 Community