Hello everyone, i need some help with my ionic projet.
I use Youtube Api to get a video Id and then open the video with InAppBrowser plugin.
It’s works with my browser and the ionic dev app. But not when i build my ipa file and run it on my ios device.
My configuration :
Ionic:
ionic (Ionic CLI) : 4.7.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.1.2 (cordova-lib@8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 9 other plugins)
System:
ios-deploy : 1.9.4
NodeJS : v10.15.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
My provider :
public fetchTrailer(mediaTitle: string) {
console.log("IN FETCH");
let searchText: string = mediaTitle + " bande annonce";
let url: string = YOUTUBE_API_URL +"search?maxResult=" +"1" +"&key=" +YOUTUBE_API_KEY +"&part=snippet&q=" +searchText;
console.log("URL " + url);
return new Promise (resolve => {
this.http
.get(
YOUTUBE_API_URL +
"search?maxResult=" +
"1" +
"&key=" +
YOUTUBE_API_KEY +
"&part=snippet&q=" +
searchText
).subscribe(
data => {
resolve(data);
},
err => {
console.log(err);
}
);
});
}
Xcode console error :
{"headers":{"normalizedNames":{},"lazyUpdate":null,"headers":{}},"status":0,"statusText":"Unknown Error","url":null,"ok":false,"name":"HttpErrorResponse","message":"Http failure response for (unknown url): 0 Unknown Error","error":{"isTrusted":true}}
Thanks a lot