Hi,
My Xamarin.Forms app is getting crashed after updating to IOS 14.6, where as it is working fine on the devices with lower versions.
Getting the following exceptions when trying to call API from IOS 14.6:
1. System.Net.WebException: CertificateUnknown
2. System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00013] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2029
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs,
System.AggregateException: Error Domain=NSURLErrorDomain Code=-XXXX "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “subdomain.domain.com” which could put your confidential information at risk." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=X, NSErrorPeerCertificateChainKey=( "<cert(XXXXX) s: *domain.com i: Go Daddy Secure Certificate Authority - G2>", "<cert(XXXXX) s: Go Daddy Secure Certificate Authority - G2 i: Go Daddy Root Certificate Authority - G2>" ), NSErrorClientCertificateStateKey=X, NSErrorFailingURLKey=https://subdomain.domain.com/api/Signin/Settings?SecurityCode=XXXXX, NSErrorFailingURLStringKey=https://subdomain.domain.com/api/Signin/Settings?SecurityCode=XXXXX, NSUnderlyingError=XXXXX {Error Domain=kCFErrorDomainCFNetwork Code=-XXXX"(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: XXXXX>, _kCFNetworkCFStreamSSLErrorOriginalValue=-XXXX, _kCFStreamErrorDomainKey=X, _kCFStreamErrorCodeKey=-XXXX, kCFStreamPropertySSLPeerCertificates=( "<cert(XXXXX) s: *sample.com i: Go Daddy Secure Certificate Authority - G2>", "<cert(XXXXX) s: Go Daddy Secure Certificate Authority - G2 i: Go Daddy Root Certificate Authority - G2>" )}}, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <XXXXX>.<1>" ), _kCFStreamErrorCodeKey=-XXXXX, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <XXXXXX>.<1>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: XXXXX>, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “subdomain.domain.com” which could put your confidential information at risk.}
Below are the VS and other Version am have:
NOTE: Facing this only in IOS 14.6 devices not in the lower versions and in Android.