Pod init error tool 'xcodebuild' requires Xcode
It needs to set your CocoaPod and command line tool version, in your Xcode:
Reset (Uninstall & install) cocoa pod:
Execute the following on your terminal to get the latest stable version:
sudo gem install cocoapods
Use keyword --pre
to get the latest pre-release:
sudo gem install cocoapods --pre
How to set/reset Command Line Tool:
You can download latest command line tool from Apple Download Portal, if you have paid apple developer account/id.
Here are current beta and stable Xcode Tool and supporting command line tool download link. (Ensure you'are logged in using premium developer account on Apple Developer Account to access these links)
Xcode 10
Once you've latest command line tool installed in your system, set it from Xcode Menu.
(Xcode Menu Items) Xcode ▶ Preferences ▶ Location ▶ Command Line Tool ▶ Select appropriate command line tool
Try the same with Terminal App
Install Command Line Tools (using Terminal app):
xcode-select --install
Change the active directory:
sudo xcode-select -switch /Library/Developer/CommandLineTools
I got this error when I updated my xcode version to 9.1. I fixed the error with the below command. In your terminal just add
Sudo gem install cocoapods --pre
and enter your mac password. Then try with
pod init
I have an another option to solved the issues. because of the issues happened in xcode 9.3, so i have create the project in xcode 9.2 , install the pod. and than after open the project in xcode 9.3 and start work on it.