简体   繁体   中英

iOS App does not like self-signed SSL certificate

We developed an iOS app, which works fine with our API on the production server, but not plays well with other servers with self-signed SSL certificate, I searched a lot for solutions, some of which say adding exception to APP config, some says generating a self-signed certificate, none of gives clear step-by-step answer. After a lot of research/experiments, I finally get this DONE, I post the question and answer here in case it can help others too.

  1. Generate the self-signed certificate with V3 support copy the code here and modify according to your env https://gist.github.com/rdj/921a55bb56d4bc62bb52

  2. Install certificate onto your device and install/trust certificates on your device by following the instructions here: https://medium.com/collaborne-engineering/self-signed-certificates-in-ios-apps-ff489bf8b96e

I have done these stuff on MAC, you should be able to make it work on any other OS.

More info, iOS 13 has more strict requirements on SSL certificate https://support.apple.com/en-us/HT210176

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM