如何在 iOS 上使用 Swift 解决这个问题?当我发出服务器请求时,出现以下错误:
The certificate for this server is invalid. You might be connecting to a server that is pretending to be “...” which could put your confidential information at risk.
最佳答案
您只需在 iOS 模拟器上安装证书
Quit your iOS Simulator. Launch Charles and go to the Help menu. Choose the "SSL Proxying > Install Charles Root Certificate in iOS Simulators" item. This will install your Charles Root Certificate into all of your iOS Simulators. Now when you start the iOS Simulator, you should be able to access SSL websites with Charles using SSL Proxyin
关于ios - Swift - 此服务器的证书无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56108914/