在撰寫Swift時,我們很常需要和Web Service API來取得資料及操作,所以在取得Web Service的json格式資料時,發現有以下的錯誤:

Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSUnderlyingError=0x61800005f350 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "(null)"}, NSErrorFailingURLStringKey=http://3a0ebbd1.ngrok.io/rest/angular/, NSErrorFailingURLKey=http://3a0ebbd1.ngrok.io/rest/angular/, NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.}

文章標籤

JerryCh 發表在 痞客邦 留言(0) 人氣()