Skip to main content
Question

XCode 9.2 deploy with all content


Forum|alt.badge.img+6

We have purchased licenses for Xcode 9.2 through VPP and pushed the app down to a lab of MacBooks. When it comes time for them to move on to the next lesson plan/task it is prompting for administrative credentials to install it. Is there an automated way to get Xcode and all of its content down to a machine without it requiring an administrator for each lesson change? Our users are students, so they are standard users. We do not wish to add them into the administrators or developers group for this to function.

8 replies

cdev
Forum|alt.badge.img+14
  • Contributor
  • 135 replies
  • December 7, 2017

Forum|alt.badge.img+13
  • Honored Contributor
  • 550 replies
  • December 7, 2017

It will also speed things up if you have your own SUS/Caching Server


Forum|alt.badge.img+6
  • Author
  • New Contributor
  • 4 replies
  • December 12, 2017

When I get time I will test these and see if it resolves our issues. Thank you all for responding, it is appreciated.


Forum|alt.badge.img+10
  • Valued Contributor
  • 71 replies
  • January 8, 2019

Even with Xcode 10.1 it's still mandatory to enter admin credentials after installation. Is there an easier way around now, in 2019.? Or are the scripts from Rich still the best way to handle this?


metalfoot77
Forum|alt.badge.img+11
  • Valued Contributor
  • 76 replies
  • February 12, 2019

@j.meister Hi there, did you ever get an answer on dealing with Xcode and deploying with VPP but needing additional components etc?


Forum|alt.badge.img+10
  • Valued Contributor
  • 71 replies
  • January 13, 2020

@kricotta Hi, as far as my experience is, no. Installing a complete Xcode environment which a standard user without administrative rights can start and use right out of the box is still not possible as it seems. This is pretty bad.


jmahlman
Forum|alt.badge.img+17
  • Valued Contributor
  • 307 replies
  • January 13, 2020

@j.meister @kricotta

The way we do it is just have a second policy available to users after they install Xcode using VPP:

#!/bin/bash

# Accept Xcode License
echo "Accepting Xcode license..."
cd /Applications/Xcode.app/Contents/Developer/usr/bin/
./xcodebuild -license accept
echo "...Xcode license accepted."

# Install Additional Components
echo "Installing Xcode additional components..."
cd /Applications/Xcode.app/Contents/Resources/Packages/
for PKG in $(find /Applications/Xcode.app/Contents/Resources/Packages -name "*.pkg"); do
  /usr/sbin/installer -dumplog -verbose -pkg "${PKG}" -target /
done

echo "...Xcode components installer finished."

# This part enables Developer Mode for programming with Xcode and elevates all user privileges

# Enable Developer Mode with devtools
echo "Enabling Developer Mode..."
cd /usr/sbin/
./DevToolsSecurity -enable
echo "...Developer Mode enabled."

# Make all users members of the builtin _developer group
echo "Elevating user privileges..."
cd /usr/sbin/
./dseditgroup -o edit -a everyone -t group _developer
echo "...User privileges set."

echo "...Xcode post-install done."

exit 0

This will install the extra stuff AND not require the user to put their admin credentials in.

If you don't use VPP, you can download the additional content from the developers portal and install it and then I think just run the second part of the script (the developer privs).

Just noticed the first post said they don't want to put the users in the developer group... I got nothing...but I'll leave this here.


Forum|alt.badge.img+10
  • Valued Contributor
  • 71 replies
  • January 27, 2020

@jmahlman Thanks for the script, I will give it a try!


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