XMLHttpRequest cannot load hhtps://example.com/api

#1

Hi Everyone,

Ionic info:

Ionic:

   ionic (Ionic CLI)  : 4.2.1 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.1

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-webview 2.3.1, (and 10 other plugins)

System:

   ios-deploy : 1.9.2
   NodeJS     : v8.11.4 (/usr/local/bin/node)
   npm        : 6.4.1
   OS         : macOS
   Xcode      : Xcode 10.1 Build version 10B61

Cordova plugin list:

cordova-fabric-plugin 1.1.14-dev "cordova-fabric-plugin"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-firebase 2.0.5 "Google Firebase Plugin"
cordova-plugin-ionic-webview 2.3.1 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-toast 2.7.2 "Toast"
cordova-sqlite-storage 2.5.2 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"

I am trying to call Restful API which is written in .Net. By using HttpClientModule.
When I run it on iOS simulator with below configuration:

I am getting below error:

The certificate for this server is invalid. You might be connecting to a server that is pretending to be “example.com” which could put your confidential information at risk.
[Error] XMLHttpRequest cannot load https://example.com/api/auth due to access control checks.

I am using Xcode Version 10.1 (10B61).

Also, I tried them with

$ ionic cordova plugin add cordova-plugin-advanced-http
$ npm install --save @ionic-native/http

Still, I am getting the same problem.

Please guide me to resolve this issue.

Thanks in advance.