Posted on 08-16-2017 09:38 AM
I am using the following Script. The license accept part works but it does not download the additional tools. On the JSS it says that they installed on the base path but when a user launches Xcode it prompts for the admin password to download the tools.
Can anyone help me if I am missing something?
Here is the script I am using:
!/bin/sh
# Accept Xcode License
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -license accept
# Enable Developer Tools
/usr/sbin/DevToolsSecurity -enable
#Install Additional Components
/usr/sbin/installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/MobileDevice.pkg -target /
/usr/sbin/installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/MobileDeviceDevelopment.pkg -target /
Here is the summary after the policy has executed:
Executing Policy Xcode 8.2.1 test
Creating directory structure for /Library/Application Support/JAMF/Downloads/
Downloading http://xserver2.remsen.sfc.edu/CasperShare/Scripts/Xcoderemoveold.sh...
Running script Xcoderemoveold.sh...
Script exit code: 0
Script result:
Downloading Xcode821.pkg...
Downloading http://xserver2.remsen.sfc.edu/CasperShare/Packages/Xcode821.pkg...
Verifying package integrity...
Installing Xcode821.pkg...
Successfully installed Xcode821.pkg.
Creating directory structure for /Library/Application Support/JAMF/Downloads/
Downloading http://xserver2.remsen.sfc.edu/CasperShare/Scripts/Xcodepostsetup.sh...
Running script Xcodepostsetup.sh...
Script exit code: 0
Script result: /Library/Application Support/JAMF/tmp/Xcodepostsetup.sh: line 1: !/bin/sh: No such file or directory<br/>Developer mode is already enabled.<br/>installer: Package name is MobileDevice<br/>installer: Upgrading at base path /<br/>installer: The upgrade was successful.<br/>installer: Package name is MobileDeviceDevelopment<br/>installer: Upgrading at base path /<br/>installer: The upgrade was successful.<br/>
Solved! Go to Solution.
Posted on 08-16-2017 11:02 AM
Apple added additional packages that must be installed prior to first launch to prevent the Additional Components must be installed prompt. Look inside /Applications/Xcode.app/Contents/Resources/Packages/ and you should see what you are missing to install.
Posted on 08-16-2017 11:02 AM
Apple added additional packages that must be installed prior to first launch to prevent the Additional Components must be installed prompt. Look inside /Applications/Xcode.app/Contents/Resources/Packages/ and you should see what you are missing to install.
Posted on 08-17-2017 08:42 AM
@rtrouton has a really nice script that should address many post-install needs for Xcode deployments.
https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/xcode_post_install_actions