In my ionic project i used private api to get flight details. it successfully work in android build. When i create IOS build it didn’t show anything from the api. how can i solve this issue?
get_arrivalflights() {
var communicationParams = {
showLoader: true,
reqUrl: "",
reqBody: {},
callBackSuccess: (response) => {
console.log(response);
this.objectData = response.flightStatuses;
},
callBackFailure: (response) => { console.log("failure dude"); console.log(response); }
};
this.restservice.makeGetRequest(communicationParams);
}
makeGetRequest(communicationParams: any) {
this.baseUrl = " the url i want to call ";
var loader;
if (communicationParams.showLoader == true) {
loader = this.loadingController.create({
content: ""
});
loader.present();
}
this.http.get(this.baseUrl + communicationParams.reqUrl)
.map(response => response.json())
.subscribe(communicationParams.callBackSuccess, function(respone) {
if (communicationParams.showLoader == true) {
loader.dismiss()
}
communicationParams.callBackFailure(respone);
},
() => {
console.log('Authentication Complete');
if (communicationParams.showLoader == true) {
loader.dismiss()
}
});
}