Skip to main content
Solved

Deploying Xcode in 2019


Did this topic help you find an answer to your question?
Show first post

39 replies

Forum|alt.badge.img+3
  • New Contributor
  • 5 replies
  • October 21, 2020

I've just tested the following and it seems to be working. You can use modify the script so that it just has the lines that are required rather than the 'if' statement. You would just then need to scope it to a smart group that contains devices that have 'Xcode' installed. I just needed this to run ASAP and to know which computers didn't have Xcode.

#!/bin/bash

if [[ -d /Applications/Xcode.app ]]; then
  echo "Xcode installed"
  /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -license accept
  /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -runFirstLaunch  #This installs the Additional Components
  /usr/sbin/DevToolsSecurity -enable
  dseditgroup -o add everyone -t group _developer
else
  echo "Xcode not installed"
  exit 1
fi

Forum|alt.badge.img+18
  • Esteemed Contributor
  • 831 replies
  • November 2, 2020

@jrippy Note the above script (and I assume Xcode 12.1) changes the location of the xcodebuild process that used to be in /Applications/Xcode.app/Contents/Resources/xcodebuild
To
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

Thats what was failing for me previously.

Gabe Shackney
Princeton Public Schools


Forum|alt.badge.img+13
  • Valued Contributor
  • 186 replies
  • November 2, 2020

@gshackney Thanks!


Forum|alt.badge.img+13
  • Valued Contributor
  • 186 replies
  • November 3, 2020

@ssc There's plenty more checking that could be done. For example, you could also use a smart group to determine which computers have Xcode installed and only scope to those.
However you want to implement it though, I was trying to provide just the needed commands to get it working.
I did have the wrong path for newer versions so I'm glad @gshackney pointed that out.


Forum|alt.badge.img+18
  • Esteemed Contributor
  • 831 replies
  • November 3, 2020

The only thing I can't remember if we need to install command line tools or is it bundled in the extra installs in the above scripting?

Gabe Shackney
Princeton Public Schools


Forum|alt.badge.img+12
  • Valued Contributor
  • 350 replies
  • November 3, 2020

I always install them as a separate package, just to be sure. However, there is no release version of the 12.1 CLTs (just the GM version).


Forum|alt.badge.img+18
  • Esteemed Contributor
  • 831 replies
  • November 3, 2020

@tomt yea I noticed the gm version and am considering just installing it instead of waiting. Also wondering if once the command line tools are installed can non admin users run the update for them when prompted?

Gabe Shackney
Princeton Public Schools


Forum|alt.badge.img+12
  • Valued Contributor
  • 350 replies
  • November 3, 2020

@gshackney Can't answer that one, I'll just push the updated CLT package if they release a full 12.1 or add the updated one to my 12.2 policy once it gets finished.


Forum|alt.badge.img+3
  • New Contributor
  • 2 replies
  • November 4, 2020

@Initialised Your script solved my problem with Xcode 12.1 asking for additional components after install even after I though I had scripted the install for everything. Thanks so much!


Forum|alt.badge.img+12
  • Valued Contributor
  • 77 replies
  • November 11, 2020

So, when everyone says that Managed Distribution (VPP) Xcode installation via Self Service is slow... are you talking like upwards of an hour before it appears in the applications folder? And if you click on anywhere else within Self Service while that process is running then the "Installing..." status will revert back to the Install button?

Because that's our current experience when trying to manage Xcode via Jamf Pro. It's so bad that we're instructing our users to leverage consumer Apple IDs to install Xcode from the App Store themselves. Which is all the more frustrating for our employees since we've federated our domain with ABM for Managed Apple IDs and they're discovering that they can not use them to install free apps.

Installing Xcode the normal way via the App Store takes a reasonable amount of time considering the file size. Attempting to install via Jamf Self Service is a horrible user experience IMO.


Forum|alt.badge.img+13
  • Contributor
  • 65 replies
  • November 13, 2020

@UESCDurandal both are god awful slow... omg I love your handle... but I digress. Yeah because both are so slo and yess VPP in Self Service is ridiculously so, I've taken to installing it as a package which is much faster. Of course that leaves you to manage the updates as well, but frankly I rather it just work and be efficiently installed.


Forum|alt.badge.img+1
  • New Contributor
  • 3 replies
  • March 13, 2021

Did Xcode installation break MacOS software updates for anyone else?


Forum|alt.badge.img+1
  • New Contributor
  • 2 replies
  • March 18, 2021

I'm hoping ppl are still following this thread. Xcode 12.4 downloaded from developer site is 11.66 GB. I've zipped it, and uploaded to our cloud instance. Pulling that down during provisioning our eng build actually isn't that bad. However, once it's downloaded, and then beings to extract using: xip --expand Xcode_12.4.xip

It takes anywhere from 40 mins to 2 hrs, on both physical hardware and VMs. Has anyone figured out a quicker way to deploy this application? Is there another extraction tool? Is there any sense in attempting a snapshot packaged install, or packing the 30 GB install? The License agreements, and installing CLI only add another 15 mins.


Forum|alt.badge.img+10
  • Valued Contributor
  • 230 replies
  • March 18, 2021

@user-iYzHNAwDQp Hey yes we're doing almost exactly the same thing here, the difference being on premise instead of cloud. In Self Service we warn users, per @alexmcclements "This fully installs Xcode - a 12GB package, this will take a VERY loonnnnnnnggggg time, you've been warned! Requires 30GB free disk space to start."

In theory you could deploy it as a DMG, then with a script mount the DMG, and make an alias in /Applications to Xcode.app on the DMG... But I've not got the cycles to tinker with it. I've long wanted to do something similar with MS Office, at least up until the very most recent couple of versions took forever to install, first unpacking from the PKG to /tmp then using ditto to copy to /Applications, esp since each Office app is replicating 500MB of fonts? Isn't APFS supposed to have some magic to make installs like this better?


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