iOS 9采用https請求,運(yùn)行舊工程或者未適配,會出現(xiàn)以下警告:
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 ? -> ? Open As ? -> ? Source Code
NSAppTransportSecurity
NSAllowsArbitraryLoads

圖片發(fā)自簡書App
2、打開 ? Info.plist ? 添加key:NSAppTransportSecurity?
輸入完成之后會自動變成:App Transport Security Settings?
再展開,添加key:Allow Arbitrary Loads ? 設(shè)置為:YES
?