问题
I'm currently getting this "SSL error" on the simulator of my app.
Error Screenshot
I have my own self-signed certificate. And this problem can be solved by installing the cert file manually on the simulator.
However, we are trying to avoid manually installing the certificate to the simulator (drag and drop) every time after building the app. And instead, I want to find a way to import the certificate file into our ios app bundle.
I followed this article and tried with the following way, but it doesn't work:
Drag the .crt file into the project navigator, and then choose to Copy items into destination group’s folder (if needed) and select the target to which you wish to add the certificate. Then build the app again. However, the same issue still happens to this build.
So my question is:
Is this the right approach to solve this ssl error by adding the .crt file into the project navigator?
Are there any other way to import the certificate into the app, or the project so I don't need to manually import it on the simulator after I get the build? (Apple only mentions the "adding manually" way at here)
Thanks for the help!
来源:https://stackoverflow.com/questions/48351079/how-to-import-self-signed-certificate-in-ios-11-to-build-the-app-instead-of-addi