* in hindsight, it'd probably be easier to just use one of the many xcode cli installers A bit of a convoluted process but should allow you to download XCode without needing additional scripts and having to setup the appstore
-
Go here and select the xcode version appropriate for your version of mac I was using the pre-setup Catalina docker, so I chose this version
-
Now if it asks you to sign in, do so and accept the terms and conditions
-
Now click the download button and then:
- Either download the xip file onto your host OS and transfer via sFTP or other means
-
Alternatively, at this point the page should switch to buffering logo and remain stuck there. Use a cookie view (I used the chrome extension
EditThisCookie
) and copy the value forADCDownloadAuth
. -
On your guest machine make a file called
cookies.txt
and add the cookie in the form.apple.com TRUE / FALSE 1679146596 ADCDownloadAuth [cookie value]
-
I assume you have homebrew installed, download wget and use the command
wget --load-cookies cookies.txt [xip download link]
- ~10gb Xcode.xip should download
-
Then simply a matter of configuration:
xip --expand [xcode.xip]
sudo cp Xcode.app /Applications
sudo rm /Library/DeveloperCommandLineTools && xcode-select -r
sudo xcodebuild -license accept
sudo xcodebuild -runFirstLaunch
(took ~10 minutes for me)DevToolsSecurity -enable
-
Remote development can be achieved via VSCode through ssh
- E.g., for swift make sure to change the sourcekit-lsp path to be the output of
xcrun --find sourcekit-lsp
- E.g., for swift make sure to change the sourcekit-lsp path to be the output of