NSURLConnection finished with error - code -1022

前端 未结 5 687
南笙
南笙 2020-12-15 06:47

Guys i try to learn webview it can\'t load give me error like:

NSURLConnection finished with error - code -1022

- (voi         


        
5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-15 07:39

    To give an answer on your question we need to see full logs. But I guess the problem in the App Transport Security. Since iOS 9 all connection should be done with https and the destination url should be backed with TLS version greater or equal 1.2, until you'll not specify exceptions in info.plist file in App Transport security section. Also you can "Allow Arbitrary Loads" for all connections, but this way isn't preferred. You can read more details about this here https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html (in the NSAppTransportSecurity section)

提交回复
热议问题