Installing cocoa pods on
M1 : (after you get this error)

extconf failed, exit code 1

 

Go to command prompt:

First command :

sudo gem install cocoapods

Second command:

xcode-select –install 

Third command:

/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”

Forth command :

brew install cocoapods

Fifth command :

pod –version 

Ready to go !