apache / apache/cordova-plugin-inappbrowser

Events not raised on iPhone

Open
#536 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

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"`

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reproducing the Ionic 4/Cordova InAppBrowser create('_self', ...) call and comparing the loadstop subscription on iOS and Android; done means determining whether loadstop is supported on iOS and fixing the event or documenting the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, angular, ios, javascript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.