Installing and Setting up Xcode
In this article, we’ll discuss how to install and set up Xcode on your local machine. We’ll be focusing on the installation procedure for Mac machines, as Xcode is an integrated development environment (IDE) developed by Apple and intended for use on macOS.
Note: In case you’re interested in installing Xcode on a Windows computer, take a look at the instructions provided in this article. Note that you may need to install third-party software or set up a virtual machine in order to install Xcode. Installing Xcode is not recommended for Chromebooks due to hardware limitations.
By the end of this article, you’ll have Xcode up and running on your computer, and be ready to start developing your first iOS app! Let’s get started.
If you run into any issues during the installation process, utilize the Xcode Help page or visit our Codecademy forums for guidance.
Prerequisites
Before you proceed to install Xcode, you first need to verify that your macOS is up to date. You’ll need Xcode version 12 or later, which can only be installed on macOS 10.15.4 or later.
Check Your macOS version
To check the macOS version on your Mac, click on the Apple icon on the top left corner of your screen.
Next, click on the About This Mac option.
You should see the system configurations of your Mac. Note that the following screen might look different if you’re running a different version of macOS.
The screenshot above shows that the current macOS is Catalina, and the version is 10.15.5. Keep in mind that macOS Catalina version 10.15.4 is the earliest version of macOS that supports Xcode 12.
If your Mac is running an older version of macOS, check if it is compatible with macOS Catalina. If it is, follow these instructions to update the operating system. If you’d like to perform a full installation of macOS Catalina, follow these steps from the Apple support page.
Check if Xcode is installed
To check if you already have Xcode installed on your Mac, you can do so either by searching through the Applications directory in the Finder window or by searching for it using Spotlight Search. Use Command
+ Spacebar
for a shortcut on pulling up the Spotlight Search.
If you have Xcode installed, you should see the icon as shown above in the list of Applications. Notice its version, 12.1, listed on the right hand side.
If you don’t have Xcode installed or if your version of Xcode is older than 12, then follow each step closely in the next section.
Installing Xcode
When installing Xcode 12 or later, it’s important to keep in mind its installation size. Xcode 12.1, in particular, requires 11.3 GB of free space on your hard drive but this number can vary depending on its version.
Additionally, you may need a few gigabytes more than the prescribed amount of memory. Thus, it’s a good idea to make sure that you have enough available space for a successful installation. You can follow the steps shown at the Apple support page on how to free up memory on your hard drive.
The next step is to install Xcode from the App Store. You can find the App Store in the Applications directory in the same way you checked for the availability of Xcode earlier.
There are two ways to locate Xcode in the App Store. You can either visit the Develop section on the left-hand side or type “Xcode” in the search bar shown below:
Depending on whether you are installing, updating, or reinstalling Xcode on your local machine, you may see one of the following options next to or below its name:
- GET: If you’re installing Xcode for the first time.
- UPDATE: If you’re updating Xcode.
- A silhouette of a cloud with an arrow pointing down: If you’re reinstalling Xcode on your machine.
Click on the option presented to you to start downloading the latest version of Xcode.
You should see a progress circle (shown below) that conveys the status of the download:
You can pause the download by clicking on the blue square button in the center if you need to.
Once the download is complete, you will observe that the button has changed to OPEN. At this point, you’re ready to launch Xcode!
Launching Xcode
Click on the OPEN button to launch Xcode. You can also locate and launch Xcode from the Applications directory or through the Spotlight search as we’ve seen previously.
You will get the following popup when launching Xcode for the first time:
Click on the Install button to set up any additional components that Xcode requires to support running and debugging your apps.
Enter the password of your Mac to enable installation of the additional components, and then click OK. Next, you’ll see the following window:
Note that installing the components may take a bit of time. You should see the following popup once the installation is complete. This startup dialog will appear every time you launch Xcode to create a new project.
Wrap up
Congratulations! You’ve just completed the first major step towards writing your first iOS app by installing Xcode on your machine.
Author
'The Codecademy Team, composed of experienced educators and tech experts, is dedicated to making tech skills accessible to all. We empower learners worldwide with expert-reviewed content that develops and enhances the technical skills needed to advance and succeed in their careers.'
Meet the full team