Skip to main content
Solved

Xcode 8.2.1 Script help


Forum|alt.badge.img+4

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/>

Best answer by sirkyle

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.

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+6
  • Contributor
  • 16 replies
  • Answer
  • August 16, 2017

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.


dwenger
Forum|alt.badge.img+13
  • Contributor
  • 36 replies
  • August 17, 2017

@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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings