File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ echo -e "\033[34m### [1/6] Checking System Requirements\033[0m"
193193printf ' \033[34m%.0s=\033[0m' {1..75} && echo
194194# ------------------------------------------------------------------------------
195195echo -e " Checking System Requirements..."
196- # Check XCode installation"
196+ # Check XCode installation
197197if [ ! -e " /Applications/Xcode.app/Contents/Developer" ]; then
198198 echo -e " \033[31m❌ Error: Xcode is not installed. Please install Xcode through the App Store."
199199 echo -e " \033[31m You can download it from: https://apps.apple.com/app/xcode/id497799835\033[0m"
@@ -202,6 +202,17 @@ else
202202 echo -e " \033[36m> Xcode installation confirmed\033[0m"
203203fi
204204
205+ # Check Xcode version
206+ XCODE_VERSION=$( xcodebuild -version | grep ' ^Xcode\s' | sed -E ' s/^Xcode[[:space:]]+([0-9\.]+)/\1/' )
207+ if [ " $XCODE_VERSION " != " 16.2" ]; then
208+ echo -e " \033[31m❌ Error: Xcode version $XCODE_VERSION is installed. This script requires Xcode version 16.2.\033[0m"
209+ echo -e " \033[33m💡 Please follow the guide to downgrade Xcode to version 16.2:\033[0m"
210+ echo -e " \033[34m https://www.antonseagull.com/post/how-to-downgrade-xcode\033[0m"
211+ exit 1
212+ else
213+ echo -e " \033[36m> Xcode version 16.2 confirmed\033[0m"
214+ fi
215+
205216# Check if the Xcode path is correct
206217if [ " $( xcode-select -p) " != " /Applications/Xcode.app/Contents/Developer" ]; then
207218 sudo xcode-select -s " /Applications/Xcode.app/Contents/Developer"
You can’t perform that action at this time.
0 commit comments