I have a pain.
It’s name is Xcode.
Why? Simply put, I work and have worked in many environments where administrator rights are totally banned for general use and Xcode utterly requires them for certain tasks. Like installing extra components such as simulators. Or command line tools. And the list goes on and on and on and on.
Well some of the work in deploying Xcode has already been done by the folks behind Munki and you can read about their work (which has repeatedly saved me many many hours) here: https://github.com/munki/munki/wiki/Xcode and many thanks go to them. I just run this after Xcode installation and it works very nicely.
However for my own needs i’ve been iterating through many script variations to install Xcode simulators. I started with “INSTALL ALL THE THINGS!” which takes a long time and eats all your disk space. (These damn things are at least 1Gb each and there’s at time of writing, 17 of them.). I moved from that to a set of major version specific scripts but that still bothered me. Lots to maintain and not that nice to use.
cocoaDialog to the rescue! It has a checkbox option .. and if I’d known what I was getting into I wouldn’t have started. Story of my life, but anyway we have an extensible solution based on the xcode-install project and to those guys I’m thankful too.
https://github.com/franton/Xcode-Scripts is where you can find the good stuff. Here’s how the simulator script works as a Self Service policy. It requires cocoaDialog and terminal notifier for the good stuff.
So you click the button and you should get something like this:
Notice the terminal notifier stuff in the corner to keep you informed. Now that list is populated up from all the available simulators that are not currently installed on your system, so the more you install the smaller that checkbox list. Hit the install button and it’ll go off to the internet and install them for you.
This will take some time.
Special shoutouts to not only the Munki project for all the Xcode work they’ve documented and done over the years but also to the xcode-install project for making all this command line stuff possible.