apache / apache/cordova-plugin-inappbrowser
inappbrowser app://close is not working on iOS
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
I had publish app to appstore.
and it works very well.
but I'm now did some change on code and found out that on IOS13 inappbrowser is not open properly( it close web right after open animation).
I saw inappbrowser change log and upgrade to 4.1.0
open very well!
but the problem is that on web view, I close web by clicking web button which is defined as window.open(app://close)
but it's not working anymore
web html 's script
```
function popClose(){
window.open('app://close');
}
```
on web browser, I clicked button and it goes to popClose.
but it's not closed on iOS...
it even don't come to call back of browser.on('loadstars').subscribe() when trigger popClose function
Ionic code is as below.
```
const browser = this.iab.create(url, '_blank', { location : 'no', toolbar : 'yes', zoom : 'yes' });
browser.on('loadstart').subscribe(
(event) => {
console.log('###### browser start ###### ');
console.log(event);
if(event.url.indexOf("tel")>-1){
console.log("gfogo")
console.log(event.url.split("tel:")[1]);
this.callNumber(event.url.split("tel:")[1]);
}
if(event.url == 'http://app://close' || event.url == 'app://close' || event.url == 'close') {
browser.close();
}
console.log('###### browser end ###### ');
}
);
```
Contributor guide
Research direction
Start with the InAppBrowser create call and its loadstart subscription, then reproduce the app://close action on iOS 13 using the provided web script. Done means the close URL reaches the event handler and browser.close() closes the in-app browser reliably.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100