usr/bin/defaults write "/Library/Preferences/".Xcode IDELastGMLicenseAgreedTo "$xcode_build_number" usr/bin/defaults write "/Library/Preferences/".Xcode IDEXcodeVersionForAgreedToGMLicense "$xcode_version_number" Xcode_license_type=`/usr/bin/defaults read "/Applications/Xcode.app/Contents/Resources/"LicenseInfo licenseType`Įcho "Second license accepted at: $(date)" Xcode_build_number=`/usr/bin/defaults read "/Applications/Xcode.app/Contents/Resources/"LicenseInfo licenseID` Xcode_version_number=`/usr/bin/defaults read "/Applications/Xcode.app/Contents/"Info CFBundleShortVersionString` For more details on this, see Tim Sutton's post: # Just in case the xcodebuild command above fails to accept the EULA, set the license acceptance info "/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild" -license accept If ]Įcho "First license accepted at: $(date)" Touch /Library/Logs/WilliamsCS/XCodeInstall.logĮxec 1/Library/Logs/WilliamsCS/XCodeInstall.logĮcho "Script started: Xcode Configure at $(date)" # Also added CodeTypes.pkg install for Xcode version 13.2.1 # Also converted from bash to zsh, mostly changed if statements # I added logging so we can see what happened after runnning this Xcode Configuration Script: (When/If you copy this script watch for unintended line breaks!) #!/bin/zsh # Set sleep timers so the macs don't go to sleep while installing software! Set Sleep Timers to 6 hours Script: #!/bin/sh The second script is the Xcode configuration script and is set to execute "'After" (This script also does a Jamf inventory at the end to drop the targeted mac out of the smart group and sets the sleep timers back to something more normal like 45 minutes)ĩ) Find Xcode on the target macs the next morning ready for use by standard users! One script to set the sleep timers to 6 hours which is set to execute "Before" anything else in the policy runs (You don't want the macs going to sleep when they are running this policy!) Include the Xcode package that you uploaded with Jamf Admin above I added a client-side limitation set to Do not run between 8:00 am and 11:45 pm since trying to do this when the network is busy during the day is, I think, asking for trouble! Set the policy to execute on recurring check-in and once per computer. The smart group criteria I used were: Application Title does not have Xcode AND Operating System like 12.3 (you may want to add a few more criteria since you don't want to run this on many macs at the same time. Scope the policy to a smart group to target the macs you want this to install on. )ħ) Copy that Packages created Xcode package to your Jamf Pro package repository using Jamf Admin.Ĩ) Now on your Jamf Pro server create a policy as follows: Also note that I was completely unsuccessful in multiple attempts of packaging this massive application with Jamf Composer! Xcode as it sits in /Applications is about 36 GBs and the resulting, compressed package is over 16 GBs. Double click that downloaded package to extract the Xcode application.ĥ) Move the extracted application to the /Applications folder on the test mac you setup in step #1 above.Ħ) Use Packages from WhiteBox to create a "raw" package with just Xcode in /Applicaations (Before running, make sure Packages has "Full Disk Access" in Security and Privacy System Preferences. (Only certain versions of Xcode will work on certain MacOSs so get the right version!)Ĥ) Xcode is delivered in an Apple specific package format which is no longer compatible directly with Jamf. (You probably already have this as it's incredibly useful for so many things!)Ģ) Get a Apple Developer's account (I believe a free account will work)ģ) Download the version of Xcode you want. ġ) Setup a "test" mac with similar hardware and the same MacOS that is DEP enrolled in Jamf just like your target macs. I hope this helps others navigate this challenge. This is working for me using Xcode 13.2.1 on MacOS 12.3 Monterey and Jamf Pro version 10.37.2. In case anyone else has the same need, here is the method that I've come up with. This adds some challenges to deploying Xcode as the APP store route using VPP can only install the most recent version of an app. Since the most recent versions of Xcode are often a bit "buggy", the faculty that teach in our Computer Science labs prefer to run a slightly older version of Xcode.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |