I'm getting an error when calling an HTTPS service from XCode using Swift and I don't understand why. The URLs I'm using are HTTPS URLs and the service calls work fine but I have to have the setting "Allow Arbitrary Loads" set to YES in order for the service calls to work. If I don't have that setting on then the service calls fail with the following:
2018-10-31 09:56:57.362568+0200 APPNAME[1691:69141] [BoringSSL] boringssl_context_alert_callback_handler(3747) [C1.1:2][0x7fcb6171e660] Alert level: fatal, description: protocol version 2018-10-31 09:56:57.362750+0200 APPNAME[1691:69141] [BoringSSL] boringssl_context_error_print(3699) boringssl ctx 0x600000a87ea0: 140511489945352:error:100000f0:SSL routines:OPENSSL_internal:UNSUPPORTED_PROTOCOL:/BuildRoot/Library/Caches/com.apple.xbs/Sources/boringssl_Sim/boringssl-109.202.1/ssl/handshake_client.cc:569: 2018-10-31 09:56:57.363026+0200 APPNAME[1691:69141] [BoringSSL] boringssl_context_get_error_code(3540) [C1.1:2][0x7fcb6171e660] SSL_AD_PROTOCOL_VERSION 2018-10-31 09:56:57.369545+0200 APPNAME[1691:69141] TIC TCP Conn Failed [1:0x600003d95c80]: 3:-9836 Err(-9836) 2018-10-31 09:56:57.375719+0200 APPNAME[1691:69141] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9836) 2018-10-31 09:56:57.375903+0200 APPNAME[1691:69141] Task .<1> HTTP load failed (error code: -1200 [3:-9836]) 2018-10-31 09:56:57.376267+0200 APPNAME[1691:69140] Task .<1> finished with error - code: -1200 error calling GET on /todos/1 Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={_kCFStreamErrorCodeKey=-9836, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x6000006c8030 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9836, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9836}}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://MYURL, NSErrorFailingURLStringKey=https:/MYURL, _kCFStreamErrorDomainKey=3}
I don't understand why I get this error because the URLs work and connect securely without the setting on, so why do I get this when the setting is off and I'm still using HTTPS?
Any assistance would be greatly appreciated.