i want to load url in web view like as
NSString *urlAddress = @"http://ashu007blr.tumblr.com/loadadd";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[self.adWeb loadRequest:requestObj];
but i get error like as
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
i find solution for google then i added NSAppTransportSecurity
in my info.plist
like as
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
but it is not working i get same error.
Did you do this?
Open your info.plist file like this picture
And add the following two attributes
NSAppTransportSecurity
NSAllowsArbitraryLoads
Note: 1st one is NSDictionary type and second one is BOOL Type
This occurs for HTTPS connections to servers that don't have the appropriate setup for Perfect Forward Secrecy.
See Apple's Tech Note which lists the requirements.
Our own server https://prod.ly needed a new SSL certificate, namely one with SHA256 signature. It was still using an older, less secure, algorithm.
These are the App Transport Security requirements:
These are the accepted ciphers:
PS: You can check your server's suitability for ATS/PFC with the SSL Labs checker page: eg https://www.ssllabs.com/ssltest/analyze.html?d=api.productlayer.com
PPS: Your original URL might be HTTP, but there are several resources referenced from the HTML that comes back that are accessed via HTTPS, eg https://secure.assets.tumblr.com
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.