To install command-line tools, follow these steps:
Open a terminal.
Enter
xcode-select
and press Enter to confirm.A dialog will pop up if the command-line tools are not installed yet. If a dialog does not pop up, the command-line tools are already installed and there is nothing to do here.
Click on the Install button to continue as shown in the following screenshot:
Before we can install CocoaPods, we need to have the latest version of the command-line tools.
If you want to trigger a reinstallation of the command-line tools regardless of whether they are already installed, this can be achieved by entering xcode-select --install
.
Now that the command-line tools are installed, we can begin with the CocoaPods installation.