How to import self-signed certificate in iOS 11 to build the app instead of adding to simulator manuelly after building?

穿精又带淫゛_ 提交于 2019-12-11 18:54:07

问题


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:

  1. Is this the right approach to solve this ssl error by adding the .crt file into the project navigator?

  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!