Objective-C SSL Synchronous Connection

后端 未结 1 1665
长发绾君心
长发绾君心 2021-01-13 17:28

I\'m a little new to objective-C but have run across a problem that I can\'t solve, mostly because I\'m not sure I am implementing the solution correctly.

I am tryin

相关标签:
1条回答
  • 2021-01-13 18:18

    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.

    0 讨论(0)
提交回复
热议问题