I recently (just yesterday), updated how we’re installing Xcode on end-user systems at work and thought I might share the steps/script that we’re using.

Tools

Setup

  1. Install unxip to a common location on disk
    • In my case it’s /Library/Management/Tools/unxip
    • unxip is used as it is able to expand the Xcode.app file in about 3 minutes
  2. Download the current version of Xcode from the Apple Developer site as a xip
  3. Rename Xcode to .xip.pkg which enables Jamf to take the upload and store it in your Cloud Distribution Point
  4. Create a Policy in Jamf to Cache the .xip.pkg file only scoped to All Computers, an Ongoing recurrence, and with a Custom Trigger
    • I use cache-Xcode-13.4
  5. Create a second policy that runs the script below
    • Make sure Parameter 4 is the version of Xcode you’re deploying, eg 13.4
    • Make sure Parameter 5 is the Custom Trigger you set on the first Policy, eg cache-Xcode-13.4
  6. This policy should be available via Self Service for end-users to run

Script Walkthrough

You can view the gist here