[Swift] URLSession https 인증서 신뢰
2022. 11. 20. 18:50
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
let urlCredential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
completionHandler(.useCredential, urlCredential)
}
728x90
'iOS > Swift' 카테고리의 다른 글
[Swift] 다른 앱 실행시키기 (0) | 2022.12.04 |
---|---|
[Swift] URLComponent (0) | 2022.11.20 |
[Swift] URLSession (0) | 2022.11.17 |
[Swift] Codable vs JSONSerialization (1) | 2022.10.15 |
[Swift] 접근제어 (0) | 2022.09.28 |