I SSL pinned our app in info.plist
by following this Apple.com's link.
I would like to show alert when certificate expired or handshaking expired.
Can someone please tell me how can I use this method for that?
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Swift.Void) {
}
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSPinnedDomains</key>
<dict>
<key>OurAppDomain.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSPinnedCAIdentities</key>
<array>
<dict>
<key>SPKI-SHA256-BASE64</key>
<string>XYZXYZXYZXYZkdlkjs78YDIU787d9=</string>
</dict>
</array>
</dict>
</dict>
</dict>