How to Download and Install Xcode on PC or Mac

Table of contents:

How to Download and Install Xcode on PC or Mac
How to Download and Install Xcode on PC or Mac
Anonim

This article explains how to install the Xcode development environment on Mac or Windows computer. In this second case, a virtual machine must be created using the VirtualBox program.

Steps

Method 1 of 2: Windows 10, Windows 8.1, and Windows 7

Download Xcode on PC or Mac Step 1
Download Xcode on PC or Mac Step 1

Step 1. Download and install VirtualBox for Windows

It is a free and open-source program that allows you to create and use different types of virtual machines, including one capable of using the Xcode program for macOS.

  • Visit the website https://www.virtualbox.org/wiki/Downloads and click on the link Windows hosts. The download of the client installation file for Windows systems will start (in some cases you will have to click on the button Save or Download to be able to continue).

    In order to install VirtualBox you must necessarily use a 64-bit version of Windows and the computer must have at least 4 GB of RAM

  • Run the installation file and follow the instructions that will appear on the screen to complete the installation of VirtualBox.
Download Xcode on PC or Mac Step 2
Download Xcode on PC or Mac Step 2

Step 2. Download the macOS High Sierra Final operating system installation file

You can download a version in RAR format from this link.

If you cannot download the file because it is too large (it takes up about 6GB), you can solve the problem by consulting this article

Download Xcode on PC or Mac Step 3
Download Xcode on PC or Mac Step 3

Step 3. Unzip the RAR file

You can use one of the many apps that can extract the data contained in a RAR archive, for example WinRAR or WinZip. At the end of the data extraction you will have a folder in which there will be a file with the extension ".vmdk" and one with the extension ".txt" related to the Apple High Sierra operating system.

Download Xcode on PC or Mac Step 4
Download Xcode on PC or Mac Step 4

Step 4. Start the VirtualBox program

The corresponding icon is contained in the section All apps in the "Start" menu.

Download Xcode on PC or Mac Step 5
Download Xcode on PC or Mac Step 5

Step 5. Click on the New button

It is located in the upper left corner of the window. The "Create Virtual Machine" dialog will be displayed.

Download Xcode on PC or Mac Step 6
Download Xcode on PC or Mac Step 6

Step 6. Type the OSX name into the "Name" text field

Download Xcode on PC or Mac Step 7
Download Xcode on PC or Mac Step 7

Step 7. Select the Mac OS X option from the "Type" drop-down menu

Download Xcode on PC or Mac Step 8
Download Xcode on PC or Mac Step 8

Step 8. Select the macOS 10.13 High Sierra (64-bit) entry or MacOS 64-Bit from the "Version" drop-down menu.

If none of the 64-bit options of the Apple manufactured operating system are present, it means that you need to enable the "VT-x" or "Virtualization" feature of the computer's BIOS. See this article to find out how you can access the BIOS

Step 9. Click the Next button

It is located at the bottom of the window.

Download Xcode on PC or Mac Step 10
Download Xcode on PC or Mac Step 10

Step 10. Drag the memory slider to the right

In this way you will indicate to the program how much RAM memory of the computer will be dedicated to the virtual machine that will use the High Sierra operating system. For best results, it is recommended that you choose a value between 3GB and 6GB.

Step 11. Click the Next button

Download Xcode on PC or Mac Step 12
Download Xcode on PC or Mac Step 12

Step 12. Create a hard drive for the virtual machine

Follow these instructions:

  • Click on the radio button "Use an existing virtual hard disk file";
  • Click on the "Browse" icon;
  • Access the folder where the VMDK file you downloaded from the web in the previous steps is stored;
  • Select the file in question and click on the button Create.
Download Xcode on PC or Mac Step 13
Download Xcode on PC or Mac Step 13

Step 13. Click the Settings icon

It is located in the upper left corner of the VirtualBox window.

Download Xcode on PC or Mac Step 14
Download Xcode on PC or Mac Step 14

Step 14. Edit the virtual machine configuration settings you just created

To do this, follow these instructions:

  • Click on the tab System listed in the left pane of the "Settings" window.

    • Within the tab called "Motherboard" select the value ICH9 from the "Chipset" drop-down menu, then select the check button Enable EFI.
    • Inside the card Processor select the value

      Step 2. as the number of processors, then move the "Execution cap" slider to 70%.

  • Click on the tab Screen listed in the left pane of the "Settings" window.

    Inside the card Screen select the value 128 MB for the "Video Memory" slider.

  • Click on the button OK to save the new settings.
Download Xcode on PC or Mac Step 15
Download Xcode on PC or Mac Step 15

Step 15. Close the VirtualBox program

Simply click on the icon in the shape of X located in the upper right corner of the program window.

Download Xcode on PC or Mac Step 16
Download Xcode on PC or Mac Step 16

Step 16. Open a "Command Prompt" window as a computer administrator

Follow these instructions:

  • Type the keyword cmd into the Windows search bar;
  • Select the icon of Command Prompt, appeared in the list of results, with the right mouse button;
  • Click on the option Run as administrator. The Windows "Command Prompt" window will appear.
Download Xcode on PC or Mac Step 17
Download Xcode on PC or Mac Step 17

Step 17. Run this series of commands

Run them respecting the order in which they are listed, but changing the path of the files according to the folder where you have installed VirtualBox on your computer and replace the "VM_Name" parameter with the name of the virtual machine you created:

  • Type the command cd "C: / Program Files / Oracle / VirtualBox \" and press the Enter key;
  • Type the command VBoxManage.exe modifyvm "VM_Name" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff and press the Enter key;
  • Type the command VBoxManage setextradata "VM_Name" "VBoxInternal / Devices / efi / 0 / Config / DmiSystemProduct" "MacBookPro11, 3" and press the Enter key;
  • Type the command VBoxManage setextradata "Name_VM" "VBoxInternal / Devices / efi / 0 / Config / DmiSystemVersion" "1.0" and press the Enter key;
  • Type the command VBoxManage setextradata "Name_VM" "VBoxInternal / Devices / efi / 0 / Config / DmiBoardProduct" "Iloveapple" and press the Enter key;
  • Type the command VBoxManage setextradata "Name_VM" "VBoxInternal / Devices / smc / 0 / Config / DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal (c) AppleComputerInc" and press the Enter key;
  • Type the command VBoxManage setextradata "VM_Name" "VBoxInternal / Devices / smc / 0 / Config / GetKeyFromRealSMC" 1 and press the Enter key.
Download Xcode on PC or Mac Step 18
Download Xcode on PC or Mac Step 18

Step 18. Restart the VirtualBox program

If you wish, you can close the "Command Prompt" window at this point.

Download Xcode on PC or Mac Step 19
Download Xcode on PC or Mac Step 19

Step 19. Click the Start icon

It is characterized by a green arrow and is located in the upper left of the VirtualBox window.

Download Xcode on PC or Mac Step 20
Download Xcode on PC or Mac Step 20

Step 20. Configure your virtual Mac

Follow the on-screen instructions to set up the virtual machine's High Sierra operating system as if it were a real Mac, then log in using your Apple ID when prompted. When you have completed this step, you will see the Mac desktop appear in the virtual machine window.

Download Xcode on PC or Mac Step 21
Download Xcode on PC or Mac Step 21

Step 21. Access the Mac App Store by clicking on the icon

Iphoneappstoreicon
Iphoneappstoreicon

It is located directly on the system dock.

Download Xcode on PC or Mac Step 22
Download Xcode on PC or Mac Step 22

Step 22. Search for the Xcode program

Type the keyword xcode into the search bar in the upper right corner of the App Store window and press the Enter key.

Download Xcode on PC or Mac Step 23
Download Xcode on PC or Mac Step 23

Step 23. Click on the Xcode entry

It should have appeared at the top of the hit list. It features an App Store-like icon with the addition of a hammer.

Download Xcode on PC or Mac Step 24
Download Xcode on PC or Mac Step 24

Step 24. Click the Get button

If you did not log in with your Apple ID during the Mac setup process, you will need to do so now.

Download Xcode on PC or Mac Step 25
Download Xcode on PC or Mac Step 25

Step 25. Click the Install button

The Xcode app will be installed on your virtual Mac. When the installation is complete, the "Open" button will appear.

Download Xcode on PC or Mac Step 26
Download Xcode on PC or Mac Step 26

Step 26. Click the Open button to start the Xcode program

Download Xcode on PC or Mac Step 27
Download Xcode on PC or Mac Step 27

Step 27. Click the Accept button

It is located in the lower right corner of the pop-up window that appears regarding the terms of the license agreement for the program.

Download Xcode on PC or Mac Step 28
Download Xcode on PC or Mac Step 28

Step 28. Enter your Mac administrator account password to continue

The Xcode program will install some additional features.

Download Xcode on PC or Mac Step 29
Download Xcode on PC or Mac Step 29

Step 29. Start a new project

  • If this is your first time using Xcode, choose the option Get started with a playground to start programming using one of the preconfigured development environments.
  • To start a project from scratch choose the item instead Create a new Xcode project.
  • If you are asked to enable developer mode on your Mac, click the button OK.

Method 2 of 2: macOS

Download Xcode on PC or Mac Step 30
Download Xcode on PC or Mac Step 30

Step 1. Access the Mac App Store by clicking on the icon

Iphoneappstoreicon
Iphoneappstoreicon

It is located directly on the system dock.

Download Xcode on PC or Mac Step 31
Download Xcode on PC or Mac Step 31

Step 2. Type the keyword xcode into the search bar in the upper right corner of the App Store window and press the Enter key

A list of results will be displayed with all entries matching the searched criteria.

Download Xcode on PC or Mac Step 32
Download Xcode on PC or Mac Step 32

Step 3. Click on the Xcode entry

It should have appeared at the top of the hit list. It features an App Store-like icon with the addition of a hammer.

Download Xcode on PC or Mac Step 33
Download Xcode on PC or Mac Step 33

Step 4. Click the Get button

Download Xcode on PC or Mac Step 34
Download Xcode on PC or Mac Step 34

Step 5. Click the Install button

The Xcode app will be installed on your virtual Mac. At the end of the installation the "Install" button will be replaced by the "Open" button.

Download Xcode on PC or Mac Step 35
Download Xcode on PC or Mac Step 35

Step 6. Click the Open button to start the Xcode program

Download Xcode on PC or Mac Step 36
Download Xcode on PC or Mac Step 36

Step 7. Click the Accept button

It is located in the lower right corner of the pop-up window that appears regarding the terms of the license agreement for the program.

Download Xcode on PC or Mac Step 37
Download Xcode on PC or Mac Step 37

Step 8. Enter your Mac administrator account password to continue

The Xcode program will install some additional features.

Download Xcode on PC or Mac Step 38
Download Xcode on PC or Mac Step 38

Step 9. Start a new project

  • If this is your first time using Xcode, choose the option Get started with a playground to start programming using one of the preconfigured development environments.
  • To start a project from scratch choose the item instead Create a new Xcode project.
  • If you are asked to enable developer mode on your Mac, click the button OK.

Recommended: