I am developing an iOS app which communicates with my HTTPS servers. In production my servers have valid 3rd party issued certificates and everything works fine. In my test environment, my test servers use certificates I've issued from my self-signed CA.
In order to test my app manually I can install the CA root certificate on all my test devices per the instructions here: https://developer.apple.com/library/archive/qa/qa1948/_index.html
How can I do something similar for the simulators used by my XCode bots?
Also I've noticed that every time I install an XCode update that bumps my max iOS version I have to re-install the CA root cert on all of my devices.
Installing the root cert on a few devices is fine, but it is pretty onerous for many devices / simulators, especially since you have to do it all the time as iOS updates happen.
Is there an automated way of doing this? I used to use a UI test to automate the CA cert installation precess similar to this post https://stackoverflow.com/questions/46940888/how-can-i-automatically-install-a-custom-ca-root-certificate-on-my-ios-simulator(which I wrote), but it not longer works in iOS 12.2.