XCode 默認發送 http 請求失敗

private let issLocationAPIURL = URL(string: "http://api.open-notify.org/iss-now.json")!

let locationRequest = AGSRequestOperation(url: issLocationAPIURL)

 

Error:

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.

 

Solution:

Update Resources > Stopfinder-Info.plist

 

Reference:

https://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章