apache / cordova-plugin-inappbrowser

Apache Cordova InAppBrowser Plugin
https://cordova.apache.org/
Apache License 2.0
1.11k stars 2.15k forks source link

Events not raised on iPhone #536

Open ioclaudio opened 4 years ago

ioclaudio commented 4 years ago

Hi, it seems that the event "loadstop" on the iPhone is never raised. The documentation says that "_self" is not supported on iOS, so the pages are opened into the external browser Safari. Is this the reason why the events don't work? Are the events usable on iOS?

If I run this code into a Ionic4 app:

`const browserRef = this.iab .create( paymentUrl, '_self', 'toolbar=yes,fullscreen=no,hidden=no,location=no,clearsessioncache=yes,clearcache=yes,zoom=no' );

// Event raised when the browser loads a page browserRef.on('loadstop').subscribe(event => { console.log('event:', event); alert('url:' + event.url); }`

The alert is never printed on iOS, on Android it works.

I'm using:

`iPhone 7

iOS 12.3.1`

The app is done with Ionic4: `Ionic: Ionic CLI : 5.2.1 Ionic Framework : @ionic/angular 4.3.0 @angular-devkit/build-angular : 0.13.9 @angular-devkit/schematics : 7.2.4 @angular/cli : 7.3.8 @ionic/angular-toolkit : 1.5.1 Cordova: Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : android 8.0.0, ios 5.0.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.0, (and 12 other plugins) Utility: cordova-res : 0.6.0 native-run : 0.2.2

C:\ProveElectron\bitsharingapp>ionic cordova plugins

cordova.cmd plugin ls cordova-plugin-device 2.0.2 "Device" cordova-plugin-file 6.0.1 "File" cordova-plugin-inappbrowser 3.0.0 "InAppBrowser" cordova-plugin-insomnia 4.3.0 "Insomnia (prevent screen sleep)" cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 4.1.0 "cordova-plugin-ionic-webview" ... es6-promise-plugin 4.2.2 "Promise"`

nathanrobb commented 4 years ago

Duplicate of #305