130

I need a Mac with Xcode to compile my iPad app. However, with macOS Sierra, I have a problem with my USB port (where I would connect my iPad) not working anymore.

Under OS X El Capitan, my USB port works great, but the problem is that the App Store only offers a download option for Xcode 8.3, which only works on macOS Sierra, so the only option I have is to manually download Xcode 8.2.1, outside of the App Stoore, via a .xip file.

How do I install Xcode from an Xcode_8.2.1.xip file I downloaded? In the future, if I need to update Xcode, how would I do that? Also where the preferences and configurations settings are saved? Will these preferences be lost on each update?

4
  • Is there a way to do this in Windows? I don't have a Mac, but I know Swift, and want to keep my skills sharp. Thanks! Commented Sep 6, 2017 at 1:32
  • Where did you download the xip file? I'm trying to find Xcode_9.0.1.xip to download it with wget or something similar. Commented Oct 28, 2017 at 23:16
  • @rraallvv this is where you can download Xcode and other developer tools: developer.apple.com/download/more Commented Dec 2, 2017 at 23:07
  • @rraallvv To download with wget you would need to use the --load-cookies option. Get your cookies after signing into the developer account. Commented Jan 16, 2020 at 20:06

4 Answers 4

172

Double-click the xip file and it will extract the Xcode application. Move Xcode to the Applications folder and you are good to go.

The App Store should present the Xcode update once you update to Sierra (macOS 10.12). If it doesn't you can download Xcode directly from the App Store. The preferences are stored in /Users//Library/Preferences and are not impacted by updating the version of Xcode or OS.

Sign up to request clarification or add additional context in comments.

16 Comments

How long is this supposed to take?
Well then. It took 8 hours for me.
The application is extracted to the same folder as the xip file, if you double-click the xip file. Extracting manually does the same thing, the expanded file is in the same folder.
Nothing but most applications are kept in Applications. Xcode will work from any location.
Xcode 10.2 contains ~260000 files in ~100000 directories in ~15 GB. A lot of small files. Therefore, unpacking is so slow.
|
57

For example, if a XIP file is located on your desktop: open the “Terminal” application found in /Applications/Utilities/ and run the following command:

 xip -x ~/Desktop/Xcode_8.2.1.xip

10 Comments

@NitinSawant It will extract it to the desktop directory
Is this faster than doubleclicking in Finder ?
I double click and it open with The Archire Ultilities / The Unarchiver ==> So slow and failure! Use xip command is faster that double click, and it's only way to make it work on my low diskspace machine. Noted that the extracted file is located at your current command prompt folder.
It gives me xip: signing certificate was "Development Update" (validation not attempted) and hang for about 8min and then, after this command, I do not have a /Applications/Xcode.app/ directory
I had after 14 minutes xip: expanded items from "/Users/user/Downloads/xcode.xip" @DimitriKopriwa
|
38
  • Find the specific Xcode version that you want to download from How to download Xcode DMG or XIP file?
  • Add the downloaded Xcode.xip in Applications
  • Double click on it, it will start expand. It will take some time.
  • If you have multiple Xcode version like 12.0, 12.1 in Applications rename it accordingly.
  • Double click on extracted Xcode version and install tools.
  • To set default Xcode version run this command:
sudo xcode-select -switch /Applications/Xcode_12.1.app
  • To check default Xcode version in your system use this command:
/usr/bin/xcodebuild -version

Note: Set default xcode step can be skip if you don't have multiple xcode versions in Applications.


Useful links:


Old Answer

Convert the xip to a dmg by opening a terminal to the folder where the xip is placed and run the following commands:

open Xcode_X_Y_Z.xip
mkdir Xcode-tmp
mv Xcode.app Xcode-tmp/Xcode.app
hdiutil create -volname "Xcode" \
    -srcfolder Xcode-tmp \
    -ov -format UDZO \
    Xcode_X.Y.Z.dmg
rm -rf Xcode-tmp

2 Comments

What is the point of converting it to a dmg? Why not just use the xip file?
I have tried that but when I tried to open the xip but it not worked, that's why I have converted it to dmg. If xip works for you than you can use it.
3

xip -x Xcode_12.4.xip command won't install under /Applications/Utilities

/Applications/Utilities requires sudo permission. So, you should run like: sudo xip -x /tmp/Xcode_12.4.xip under /Applications/Utilities path

2 Comments

How do we run sudo xip -x /tmp/Xcode_12.4.xip under Applications/Utilities path though. Do you mean, we should copy the .xip file to Applications/Utilities and run it from there?
In terminal, enter 'cd /Applications/Utilities' then 'sudo xip -x /tmp/Xcode_12.4.xip'. However on my side, the Xcode.app file is in /Applications directly...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.