We are trying to access the server using the IP address and port no. ATS is enabled in the app. When we are trying to access the server using a port other than 443, we are getting an SSL certificate ERROR.
ADDING ERROR LOGS:-
Task <62F14DD0-7A09-4F8B-BE6A-4F6F3FEF3CF7>.<16> finished with error [1,84,46,74,40,73,70,95,50,416] Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=( "<cert(0x7fb752810a00) s: XO MobileAdapter i: XO MobileAdapter>" ), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://124.114.128.198:8446, NSErrorFailingURLStringKey=https://124.114.128.198:8446, NSUnderlyingError=0x6000035ec330 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x600000bc8500>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=( "<cert(0x7fb752810a00) s: XO MobileAdapter i: XO MobileAdapter>" )}}, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <62F14DD0-7A09-4F8B-BE6A-4F6F3FEF3CF7>.<16>" ), _kCFStreamErrorCodeKey=-9802, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <62F14DD0-7A09-4F8B-BE6A-4F6F3FEF3CF7>.<16>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x600000bc8500>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.}
Is there any way we can allow ports other than 443 when ATS enabled?