I am very new to macOS, I just need a mac with Xcode to compile my app. However, with macOS Sierra, I have a problem with my USB that is not working anymore (i can't plug my ipad pro)
Under OSX el capitan my usb works great, but now the problem is that app store offer me to download the Xcode 8.3 only that can work only on Sierra (strange they offer you to download something not compatible with your system but doesn't matter, it's apple). so the only way i have is to download manually the xcode 8.2.1
Now my question, how to install the Xcode_8.2.1.xip I just downloaded? and in near future, if I need to update xcode (I guess downloading myself a new version), how will I do? Also where the preferences and configurations settings are saved? does these preferences will be lost on each update?
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/<username>/Library/Preferences
and are not impacted by updating the version of Xcode or OS.
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
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.
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
Update: 17 May, 2020: Most easy way
- Download the specific Xcode version that you want [from here][1]
- 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.
Update: 08 Oct, 2020: Easy way
https://ladydebug.com/blog/2019/08/20/xcode-installation-from-xip-file/
https://www.freecodecamp.org/news/how-to-download-and-install-xcode/
Old Ans
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
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
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?
Success story sharing