banner



How To Set Xcode Path In Mac

How to Download Xcode and Install it on Your Mac – and Update it for iOS Development

Xcode is the tool developers use to build apps for the Apple ecosystem – MacOS, iOS, and all things Apple.

This guide volition walk you lot through how to successfully install Xcode onto your Mac, from start to cease.

Hither are some handy tips to know before you go started:

  • Xcode simply runs on a mac. If you lot are on a PC, sadly you lot won't exist able to use Xcode.
  • You'll need a adept, stable net connection. The latest version is effectually 8 gigabytes in size.
  • Be certain to accept at least 30 gigabytes of gratis infinite on your reckoner. The latest .xip file (v11.4.ane at the time of writing) is ~8 gigabytes zipped. When y'all unzip it, that's another 17 gigabytes. Then you'll demand the command line tool, which is yet another 1.v gigabytes.

Here'south an overview of the steps to install Xcode

  1. Download Xcode
  2. Install the control line tool
  3. Open up the new version
  4. Delete files

Note that I take listed some Terminal commands in the steps below. These commands can be typed into your present working directory. This means that yous don't demand to navigate to whatever item folder.

If you really desire to, yous tin can first type cd earlier typing the commands in the below steps. This will render you dorsum to the home folder.

Step #one: Download Xcode

There are ii means to do this. For the latest version and a theoretically "easy" installation, you can use the App Store. I don't recommend this pick.

I prefer to utilize the developer site. This comes with the bonus pick of being able to download whatever version you lot'd like.

Option #1: Download via the App Shop for the latest version (not my preferred option)

In theory, this should be a seamless and pain-complimentary procedure. Just if the installation fails for whatever reason on the last step, it is very hard to troubleshoot.

There are a few reasons for failure, and no piece of cake way to know which is the underlying cause. If y'all do meet a failure, you volition need to re-download the entire file again each time y'all try to fix the failure. As the latest version is 8 gigabytes, I didn't much enjoy this approach.

Simply if yous're feeling brave, here are the steps:

  • Open up the App Store on your mac
  • Sign in
  • Search for Xcode
  • Click install or update

Selection two: Download via the Developer site for a specific version (my preferred option)

image-258
A screenshot of https://developer.apple.com/download/more/
  1. Head to the "more" section of the Apple programmer website
  2. Sign in with your iTunes account id
  3. Type in the version that y'all'd like, and download the Xcode_x_x_x.xip file. Keep in mind that Xcode 11.4.1 is eight gigabytes, so this will take awhile depending on your net connexion.
  4. Once the file is downloaded, click on .xip to extract it. Your laptop volition extract information technology to the same folder you lot downloaded it to. This extraction procedure is automatic. Y'all don't need to practice anything more after you click on the .xip file. This step volition take a few minutes.
  5. [Optional] One time extracted, rename the application to "Xcode11.10.x" if you are using multiple versions.
  6. Elevate awarding to the Applications folder
  7. [Optional] Set the new Xcode version every bit the default. Open Terminal and type sudo xcode-select -switch /Applications/Xcodex.x.10.app . Supervene upon ten.x.x with the version number. For example: Xcode11.4.1.app. You lot will need to enter in your reckoner admin password. I'1000 pretty sure this volition update the default Xcode version for all users on your figurer, so best to check with other users start

If you take multiple users on your computer, yous will need to update the CLT for each user.

Download .dmg

image-269
A screenshot of https://developer.apple.com/download/more/

To update the CLT, become to app developer website and download the command line tool .dmg.

If you have never installed Xcode earlier, you may be able to update with your Final by typing in xcode-select --install instead of visiting the programmer website.

Only if you have an existing version of Xcode installed on your machine, you lot'll probably see this mistake:

                xcode-select: mistake: command line tools are already installed, use "Software Update" to install updates              

This means you'll need to go to the programmer website instead.

Installing the CLT

When the .dmg has finished downloaded, double click the file to open it. This will open a little window that looks like this:

image-271

Double click the box and follow the prompts to install the CLT. Information technology will take a few minutes to consummate.

Information technology may ask you at the end of the installation whether you want to move this to the trash bin. When it does this, it's talking about moving the .dmg file to the trash bin. Since you should no longer need this file. I ever say yes to this.

Footstep #3: Open up Xcode

Open the Applications folder and open the new version of Xcode. If y'all renamed Xcode, make sure you open the correct application

Xcode may prompt you to install additional components. Click install. This will take a few minutes.

image-273

While it's installing, check that your default Xcode version is the one y'all merely downloaded:

  • Open Terminal
  • Blazon brew config
  • You should meet "CLT" and "Xcode" versions, every bit well equally everything else. This should reflect the version that you have but downloaded. In my instance, I downloaded Xcode 11.four.1.
                CLT: 11.4.1.0.1.1586360307 Xcode: eleven.4.ane => /Applications/Xcode11.4.1.app/Contents/Developer              

Once the components are installed, Xcode will launch. Y'all should be able to choice upwards your old projects and continue where yous left off seamlessly*.

*Note that if you lot utilize any proxy tools, such equally Charles, y'all will need to re-install those certificates in your simulator once again.

If you run into any errors while trying to build or run a project, check which device yous are trying to launch. The new version may non recall the device you were using before. If so, click on the device and choose "Add additional simulators" from the drop downwards carte to add the device y'all desire.

image-275

Step #4. Delete the files

If you lot don't demand the older versions of Xcode on your estimator, yous tin can uninstall them and get some difficult drive space back.

You can also delete the .xip file of the version you just downloaded, as well every bit the CLT.dmg file.

That'due south everything. I hope this has helped you successfully install Xcode. Have fun with it!



Acquire to code for gratuitous. freeCodeCamp'southward open up source curriculum has helped more than twoscore,000 people get jobs as developers. Become started

Source: https://www.freecodecamp.org/news/how-to-download-and-install-xcode/

0 Response to "How To Set Xcode Path In Mac"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel