Step 1: Install Xcode from App Store
First, you have to install Xcode from the app store and then let it run and install.
Step 2: Open terminal and Run Install command
Second, you need to run the command to install the Xcode command-line tools. Copy and paste the code below in your terminal.
Step 3: Verify If Installation success
To verify if the installation success you can run the following command.