apache / apache/cordova-plugin-inappbrowser
Ionic 4 in appbrowser Messsage event not receving in IOS
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
I am using in app browser to open one external link. We require to capture message which is post from that link. In app browser plugin has one "message" event listener. That message event is not working in ios. But for android it is working.
## Problem
In ios unable to listen message event which is posted from the site. In android it is listening properly.We are using below code to listen message event .
this.browser = this.inAppBrowser.create("url", '_blank', browserOptions);
this.browser.show();
this.browser.on("message").subscribe(() => {
alert("message recevied")
})
### What is expected to happen?
From above code it should give me the alert as message recevied.
### What does actually happen?
It is not displaying an alert. Message event is not listened in ios.
## Information
### Command or Code
this.browser = this.inAppBrowser.create("url", '_blank', browserOptions);
this.browser.show();
this.browser.on("message").subscribe(() => {
alert("message recevied")
})
### Environment, Platform, Device
We are receiving this issue in iPhone 13.3 and other version of ios.
### Version information
## Checklist
- [ ] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [ ] I included all the necessary information above
Contributor guide
Research direction
Start with the provided InAppBrowser reproduction using the `message` listener on iOS, then inspect the plugin's iOS and Android implementations to compare their event handling. Reproduce the failure on the reported iOS environment; done means the posted message triggers the expected alert on iOS as it does on Android.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript, objective-c
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100