I am trying to communicate with the backend of my project. So I need to install the certificate into the simulator. I have the .pem file but when I drag-dropped it into the simulator, I got
the error "Simulator device failed to complete the requested operation.". The simulator is an iPhone 16 Pro running iOS 18.5. Is there any way to install the cert to my simulator?
PS: I can't use Apple Configurator or MDM because I am using the office's Mac. And I can't install anything there. So I can only do it manually.
Self-signed server certificates are tricky, and I recommend that you avoid them. Rather, my advice is that you set up a test certificate authority (CA) and then have it issue a certificate to your server. That’s a path that works reliably.
I use Certificate Assistant for this, as explained in TN2326 Creating Certificates for TLS Testing.
Once you have this set up, you can install your CA’s root certificate as explained in QA1948 HTTPS and Test Servers.
This process might actually work for your existing server certificate, but my experience is that it’s quite brittle. Still, you’re falling at the first hurdle right now:
I have the .pem file
You need to convert this to DER. The ‘dragging to the simulator’ technique doesn’t work for PEMs.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"