Ionic HTTP request failed error in ios

I am getting below error, when trying to call a https request in ionic 4 app on iPhone.
And server SSL certificate is a valid and trusted one. Does any one knows a fix for this?

14:49:08 iPhone[269] : Task <4926BFD7-00C3-47FC-BC4B-5F4F85F73344>.<3> HTTP load failed (error code: -1202 [3:-9843])
14:49:08 iPhone[269] : Task <4926BFD7-00C3-47FC-BC4B-5F4F85F73344>.<3> finished with error - code: -1202
14:49:08 iPhone[269] : Task <4926BFD7-00C3-47FC-BC4B-5F4F85F73344>.<3> load failed with error Error Domain=NSURLErrorDomain Code=-1202 UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=, NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=, NSErrorFailingURLStringKey=, NSUnderlyingError=0x104d06a20 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=, _kCFNetworkCFStreamSSLErrorOriginalValue=-9843, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9843, kCFStreamPropertySSLPeerCertificates=}}, _NSURLErrorRelatedURLSessionTaskErrorKey=, _kCFStreamErrorCodeKey=-9843, _NSURLErrorFailingURLSessionTaskErrorKey=, NSURLErrorFailingURLPeerTrustErrorKey=, NSLocalizedDescription=} [-1202]

can you share your ionic info? what cordova-ios version you are using?

Please see below


Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.1.2


Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.0, (and 6 other plugins)


cordova-res : not installed
native-run : not installed


ios-deploy : 1.9.4
ios-sim : 8.0.2
NodeJS : v10.16.0 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.3 Build version 10G8

Did u try installing the whitelist plugin ?

npm i cordova-plugin-whitelist

Does your config.xml has allow-navigation tags?

Yes, I did. Same issue.

Yes, I already have them.

If you do ionic serve then on browser does the API call work?

Yes, it works. Working in android device also. Issue is only in iPhone.

How are you taking the build? are you uploading to Apple test flight and testing? or if you are taking adhoc build or from xcode you are directly running by connecting your phone, see the xcode logs, that might reveal something. Are you in skype? i can help out there (issue seems interesting)

Just to check if it the issue with ios or your API backend, can you try making a GET call to this API see if that works