Created
July 27, 2023 11:11
-
-
Save scriptingosx/b280e733dc2a7dafc56fe115060f9787 to your computer and use it in GitHub Desktop.
Configure Xcode post installation script with SDK download for Xcode 14 and 15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export PATH=/usr/bin:/bin:/usr/sbin:/sbin | |
xcodePath="/Applications/Xcode.app" | |
if [ ! -e "$xcodePath" ]; then | |
echo "no app at $xcodePath, exiting..." | |
exit 1 | |
fi | |
# select Xcode | |
xcode-select -s "$xcodePath" | |
# accept license | |
xcodebuild -license accept | |
# install additional components | |
xcodebuild -runFirstLaunch | |
# add everyone (every local account) to developer group | |
dseditgroup -o edit -a everyone -t group _developer | |
# enable dev tools security | |
DevToolsSecurity -enable | |
# download platform SDK | |
# all available platforms | |
# xcodebuild -downloadAllPlatforms | |
# update previously downloaded platforms | |
# xcodebuild -downloadAllPreviouslySelectedPlatforms | |
# download individual platforms (repeat for each) | |
# options are: watchOS, tvOS, and (Xcode 15+) iOS, and xrOS | |
xcodebuild -downloadPlatform iOS | |
xcodebuild -downloadPlatform watchOS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment