Hello
Anyone here, which used the guide for the xcode installation from:
Deploying Xcode on managed devices (jamf.com)
everything works for me til i start to install it via self service. After downloading the pkg
i receive in my log:
no app at /Applications/Xcode.app, exiting
I am using the script from:
Configure Xcode post installation script with SDK download for Xcode 14 and 15 (github.com)
#!/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
I tried to comment a few things in the script:
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
the only difference is, that the pkg is in the application folder.
Result from policy is:
[STEP 1 of 6]
Executing Policy SelfService - Xcode 15.4
[STEP 2 of 6]
Downloading Xcode-15.4.pkg...
Downloading https://xxxxx.jamfcloud.com/jcds/downloads/Xcode-15.4.pkg...
Verifying package integrity...
Installing SELFSERVICE - Xcode-15.4.pkg...
Successfully installed SELFSERVICE - Xcode-15.4.pkg.
[STEP 3 of 6]
Running script ConfigureXcode TEST2...
Script exit code: 1
Script result:
Error running script: return code was 1.
[STEP 4 of 6]
[STEP 5 of 6]
Inventory will be updated when all queued actions in Self Service are complete.
[STEP 6 of 6]
i dont understand why the pkg is not installing the xcode app in the applications folder
someone a idea how to solve it.
thx in advance