Get Xcode to run on a PC or a Mac
This wikiHow teaches you how to install Xcode on a Mac or a Windows PC running VirtualBox.
Downloading Xcode
If you have a PC, download VirtualBox and Mac OS High Sierra to run XCode. If you have a Mac, go to the App Store, search for Xcode, and download the program.
Steps
Since Xcode is only available for macOS, you need to download a virtual machine to emulate a Mac.
-
Download and install VirtualBox for Windows. This is a free, open-source hypervisor that enables you to run multiple virtual machines, including Xcode for macOS. [1] X Research source
- Go to https://www.virtualbox.org/wiki/Downloads
and click Windows hosts
. This starts the download (though you may have to click Save
or Download
to continue).
- You must be using a 64-bit version of Windows with at least 4 GB of RAM.
- Run the installer, then follow the on-screen instructions to complete the installation.
- Go to https://www.virtualbox.org/wiki/Downloads
and click Windows hosts
. This starts the download (though you may have to click Save
or Download
to continue).
-
Download macOS High Sierra Final. You can get the RAR version for free here .
- If you canโt download it because the file is too large (itโs 6 GB), you can get the fix.
Advertisement -
Extract the RAR file. You can use any extraction app that supports RAR files, such as WinRAR or WinZip. Once the file is extracted, youโll have a folder containing a High Sierra .vmdk file and a .txt file.
-
Open VirtualBox. Youโll find it in the All Apps area of the Start menu.
-
Click New . Itโs at the top-left corner of the app. The โCreate Virtual Machineโ dialog will appear.
-
Type OSX into the โNameโ field.
-
Select Mac OS X from the โTypeโ drop-down menu.
-
Select macOS 10.13 High Sierra (64-bit) or MacOS 64-Bit from the โVersionโ drop-down.
- If you donโt see any 64-bit options, you must enable VT-x or โvirtualizationโ in your BIOS settings. See Change Computer BIOS Settings to learn how to access the BIOS.
-
9Click Next . Itโs at the bottom of the window.
-
Drag the slider to the desired memory size. This is how much hard drive space youโll allocate to High Sierra. Itโs best to use between 3 GB and 6 GB.
-
11Click Next .
-
Create a hard disk. Hereโs how:
- Click the button next to โUse an existing virtual hard disk drive.โ
- Click the browse icon.
- Navigate to the High Sierra .vmdk file you extracted earlier.
- Select the file and click Create .
-
Click Settings . Itโs at the top-left corner of the window.
-
Edit your virtual machine. Make the following updates to your settings:
- Click System
in the left column.
- On the motherboard tab, select ICH9 from the โChipsetโ menu, then check the box next to Enable EFI .
- On the Processor tab, select 2 as the number of processors, then move the โExecution capโ slider to the 70% mark.
- Click Display
in the left column.
- On the Screen tab, select 128 MB as the โVideo Memoryโ value.
- Click OK to save your changes.
- Click System
in the left column.
-
Close VirtualBox. You can do this by clicking the X at the top-right corner of the app.
-
Open an elevated command prompt on your PC. Hereโs how:
- Type cmd into the search box in the task bar.
- Right-click Command Prompt in the search results.
- Click Run as administrator . A black window with the command prompt will appear.
-
Run these commands at the prompt. Run these in order, but replace the paths to the location of your VirtualBox, and โYour VM Nameโ with its name:
- Type cd "C:\Program Files\Oracle\VirtualBox\" and press โต Enter .
- Type VBoxManage.exe modifyvm "Your VM Name" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff and press โต Enter .
- Type VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3" and press โต Enter .
- Type VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" and press โต Enter .
- Type VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple" and press โต Enter .
- Type VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" and press โต Enter .
- Type VBoxManage setextradata "Your VM Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1 and press โต Enter .
-
Open VirtualBox again. You can also close the CMD window if you wish.
-
Click Start . Itโs the green arrow icon at the top-left corner of the app.
-
Set up your virtual Mac. Follow the on-screen instructions to set up High Sierra like youโre setting up a new computer, and log in with your Apple ID as prompted. When youโre finished, your virtual Mac will display its home screen.
-
Open the App Store. Itโs in the Dock at the bottom of the screen.
-
Search for Xcode. Type xcode into the search bar at the top-right corner of the App Store and press โต Enter .
-
Click Xcode . It should be the first result. Look for the blue app store icon with a hammer.
-
Click Get . If you didnโt sign in with your Apple ID during setup, youโll have to do so now.
-
Click Install . Xcode will install on your virtual Mac. When itโs finished, an โOpenโ button will appear.
-
Click Open to launch Xcode.
-
Click Agree . Itโs at the bottom-right corner of the license agreement pop-up.
-
Enter your Mac administrator password to continue. Xcode will now install some additional features.
-
Start a new project.
- If youโre new to Xcode, select Get started with a playground to code in a preset environment.
- To start a project from scratch, click Create a new Xcode project .
- If asked to enable developer mode on your Mac, click OK .
Advertisement
-
Open the App Store. Youโll find its icon on the Dock, which is usually at the bottom of the screen.
-
Type xcode into the search bar and press โ Return . A list of matching results will appear.
-
Click Xcode . It should be the first result. Look for the blue app store icon with a hammer.
-
Click Get .
-
Click Install . Xcode will now download and install on your Mac. When the app is finished installing, the โInstallโ button will change to โOpen.โ
-
Click Open . Xcode will launch.
-
Click Agree . Itโs at the bottom-right corner of the license agreement pop-up.
-
Enter your administrator password. Xcode will now install additional components on your Mac.
-
Start a new project.
- If youโre new to Xcode, select Get started with a playground to code in a preset environment.
- To start a project from scratch, click Create a new Xcode project .
- If asked to enable developer mode on your Mac, click OK .
Advertisement
Community Q&A
Search
-
QuestionWhy can't I download Xcode in Appstore or VirtualBox?Community AnswerFirst, make sure OS is up to date to be able to install Xcode successfully. You can update Mac OS updates from the App Store before trying to install Xcode. Then, you should be able to download it. It is not VirtualBox's Appstore, it is in the appstore of MacOS/Apple. Virtualbox just runs the macOS. Try signing in to the App store, or in settings (System Preferences). Make sure your macOS version is High Sierra or higher.
-
QuestionWhat do I do if the App Store gives me the following error: "Xcode can't be installed on High Sierra Final by Techsviewer"?Community AnswerIt will need to download a compressed packaged installer, then uncompress that package, then install Xcode. You need room for the package, the uncompressed bits, and any installed Xcode. Then the installer will clean up after itself. You need more than 5GB of free space. You should have a lot more than 5GB on a normal basis anyway.
-
QuestionCan I download Xcode with High Sierra 10.13.6?Community AnswerYes, although you might want to update to a newer version for optimal performance.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Tips
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
References
About This Article
Thanks to all authors for creating a page that has been read 97,582 times.
Advertisement