Objective-C SSL Synchronous Connection

倾然丶 夕夏残阳落幕 提交于 2019-12-01 06:35:02

According to the Apple docs (URL Loading System Programming Guide), the synchronous NSURLRequest method is not recommended because "because it has severe limitations". It would appear that the lack of the ability to control what certificates are acceptable is one of these limitations.

And yes, you are right, it is the delegate:self on the NSURLConnection setup that causes your delegate methods to be invoked. Because the simple (or simplistic) synchronous sendSynchronousRequest: call doesn't provide a way to specify a delegate, those delegate methods aren't used.

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