Allow unverified ssl certificate in UIWebview

后端 未结 7 1955
北恋
北恋 2020-12-02 07:05

I\'m embedding a website in a UIWebView. During development I have it pointed at localhost. The problem is that whenever it hits a \"https://\" url it doesn\'t load. When I

7条回答
  •  暖寄归人
    2020-12-02 07:36

    I know its a bit late but it can help others, I found an article to bypass ssl in iOS app, All you need to do is setup your webview and do a post request from application to your server and if you get an ssl error that means you dont have a valid certificate on your server, In order to bypass you have to use webview delegates methonds which are 1.) Can Authenticate Against Protection Space 2.) Should start load with request 3.) Did Receive Authentication Challenge You can copy these function from this URL, For me it works pretty well. Hope it helps

提交回复
热议问题