1. 程式人生 > >IOS使用WebView訪問http失敗

IOS使用WebView訪問http失敗

錯誤:App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file

  1. 在Info.plist中新增NSAppTransportSecurity型別Dictionary
  2. NSAppTransportSecurity下新增NSAllowsArbitraryLoads型別Boolean,值設為YES