Download ArticleDownload Article

This How.com.vn teaches you how to install Xcode on a Mac or a Windows PC running VirtualBox.

Method 1
Method 1 of 2:

Windows 11, 10, 8.1, and 7

Download Article

Since Xcode is only available for macOS, you need to download a virtual machine to emulate a Mac.

  1. How.com.vn English: Step 1 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]
    • 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.
  2. How.com.vn English: Step 2 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
  3. How.com.vn English: Step 3 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.
  4. How.com.vn English: Step 4 Open VirtualBox.
    You’ll find it in the All Apps area of the Start menu.
  5. How.com.vn English: Step 5 Click New.
    It’s at the top-left corner of the app. The “Create Virtual Machine” dialog will appear.
  6. How.com.vn English: Step 6 Type OSX into the “Name” field.
  7. How.com.vn English: Step 7 Select Mac OS X from the “Type” drop-down menu.
  8. How.com.vn English: Step 8 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.
  9. 9
    Click Next. It’s at the bottom of the window.
  10. How.com.vn English: Step 10 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.
  11. 11
    Click Next.
  12. How.com.vn English: Step 12 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.
  13. How.com.vn English: Step 13 Click Settings.
    It’s at the top-left corner of the window.
  14. How.com.vn English: Step 14 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.
  15. How.com.vn English: Step 15 Close VirtualBox.
    You can do this by clicking the X at the top-right corner of the app.
  16. How.com.vn English: Step 16 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.
  17. How.com.vn English: Step 17 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.
  18. How.com.vn English: Step 18 Open VirtualBox again.
    You can also close the CMD window if you wish.
  19. How.com.vn English: Step 19 Click Start.
    It’s the green arrow icon at the top-left corner of the app.
  20. How.com.vn English: Step 20 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.
  21. How.com.vn English: Step 21 Open the App Store icon.
    It’s in the Dock at the bottom of the screen.
  22. How.com.vn English: Step 22 Search for Xcode.
    Type xcode into the search bar at the top-right corner of the App Store and press Enter.
  23. How.com.vn English: Step 23 Click Xcode.
    It should be the first result. Look for the blue app store icon with a hammer.
  24. How.com.vn English: Step 24 Click Get.
    If you didn’t sign in with your Apple ID during setup, you’ll have to do so now.
  25. How.com.vn English: Step 25 Click Install.
    Xcode will install on your virtual Mac. When it’s finished, an “Open” button will appear.
  26. How.com.vn English: Step 26 Click Open to launch Xcode.
  27. How.com.vn English: Step 27 Click Agree.
    It’s at the bottom-right corner of the license agreement pop-up.
  28. How.com.vn English: Step 28 Enter your Mac administrator password to continue.
    Xcode will now install some additional features.
  29. How.com.vn English: Step 29 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.
  30. Advertisement
Method 2
Method 2 of 2:

macOS

Download Article
  1. How.com.vn English: Step 1 Open the App Store icon.
    You’ll find its icon on the Dock, which is usually at the bottom of the screen.
  2. How.com.vn English: Step 2 Type xcode into the search bar and press ⏎ Return.
    A list of matching results will appear.
  3. How.com.vn English: Step 3 Click Xcode.
    It should be the first result. Look for the blue app store icon with a hammer.
  4. How.com.vn English: Step 4 Click Get.
  5. How.com.vn English: Step 5 Click Install.
    Xcode will now download and install on your Mac. When the app is finished installing, the “Install” button will change to “Open.”
  6. How.com.vn English: Step 6 Click Open.
    Xcode will launch.
  7. How.com.vn English: Step 7 Click Agree.
    It’s at the bottom-right corner of the license agreement pop-up.
  8. How.com.vn English: Step 8 Enter your administrator password.
    Xcode will now install additional components on your Mac.
  9. How.com.vn English: Step 9 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.
  10. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Why can't I download Xcode in Appstore or VirtualBox?
    How.com.vn English: Community Answer
    Community Answer
    First, 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.
  • Question
    What do I do if the App Store gives me the following error: "Xcode can't be installed on High Sierra Final by Techsviewer"?
    How.com.vn English: Community Answer
    Community Answer
    It 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.
  • Question
    Can I download Xcode with High Sierra 10.13.6?
    How.com.vn English: Community Answer
    Community Answer
    Yes, although you might want to update to a newer version for optimal performance.
See more answers
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
      Thanks for submitting a tip for review!

      About This Article

      How.com.vn English: Nicole Levine, MFA
      Written by:
      How.com.vn Technology Writer
      This article was co-authored by How.com.vn staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for How.com.vn. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions. This article has been viewed 87,703 times.
      How helpful is this?
      Co-authors: 10
      Updated: August 10, 2022
      Views: 87,703
      Categories: Windows | Mac
      Thanks to all authors for creating a page that has been read 87,703 times.

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement