File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 2020
2121set -euo pipefail
2222
23+ macos_version=$( sw_vers --productVersion)
24+ if [[ " $macos_version " -ge 15 ]]; then
25+ xcode_version=" 16.1"
26+ iphone_version=" 16"
27+ else
28+ xcode_version=" 15.3"
29+ iphone_version=" 15"
30+ fi
31+
2332# Set default parameters
2433if [[ -z " ${SPM:- } " ]]; then
2534 SPM=false
@@ -31,7 +40,7 @@ if [[ -z "${SPM:-}" ]]; then
3140fi
3241if [[ -z " ${OS:- } " ]]; then
3342 OS=iOS
34- DEVICE=" iPhone 16 "
43+ DEVICE=" iPhone ${iphone_version} "
3544 echo " Defaulting to OS=$OS "
3645 echo " Defaulting to DEVICE=$DEVICE "
3746fi
@@ -123,6 +132,6 @@ function xcb() {
123132}
124133
125134# Run xcodebuild
126- sudo xcode-select -s /Applications/Xcode_16.1. app/Contents/Developer
135+ sudo xcode-select -s " /Applications/Xcode_ ${xcode_version} . app/Contents/Developer"
127136xcb " ${flags[@]} "
128137echo " $message "
You can’t perform that action at this time.
0 commit comments