apache / cordova-plugin-inappbrowser

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

not work ios13 InAppbrowser select target _blank #492

Closed megumih closed 5 years ago

megumih commented 5 years ago

Bug Report

I'm creating ios13 app.

But ios13Beta2 is not working in InAppBrowser.

so select param '_blank', this app is crash.

This is error detail. [TraitCollection] Class _UIFullscreenPresentationController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API.

My ionic environment

Ionic:

Ionic CLI : 5.0.3 (/Users/syoken/.nvm/versions/node/v12.4.0/lib/node_modules/ionic) Ionic Framework : ionic-angular 3.9.6 @ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : ios 5.0.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 14 other plugins)

Utility:

cordova-res : not installed native-run : not installed

System:

ios-sim : 8.0.1 NodeJS : v12.4.0 npm : 6.9.0 OS : macOS Catalina Xcode : Xcode 11.0 Build version 11M337n

please tell me!

NiklasMerz commented 5 years ago

@ambr89 You may need to delete the iOS platform and add it again to update the plugin code.

ambr89 commented 5 years ago

I've resolve, I've add cordova-plugin-wkwebview-engine to my project and now it works!

Thanks all!

FredCote commented 5 years ago

Had the problem on our app. Added this branch and reinstalled the plugin and everything work! IAB stay open! Thanks!

charlesw325 commented 4 years ago

I tried this and this has resolved my problem with inappbrowser in ios13 , the page is loading with target = _blank ,how ever, I'm facing 2 issues after updating the inappbrowser :

  1. the there is still a gray bar on top of the screen , but it's not blocking any of my page components.
  2. some of my components in the bottom of the page went out side of the screen .

I'm using cordova-plugin-inappbrowser 3.1.1-dev Cordova-plugin-ionic-webview 4.1.3

I have usewkwebview : "yes" location : 'no', hidden : 'no', zoom : 'no', hardwareback : 'yes', mediaPlaybackRequiresUserAction : 'no', shouldPauseOnSuspend : 'no', closebuttoncaption : 'Close', disallowoverscroll : 'no', toolbar : 'no', enableViewportScale : 'no', allowInlineMediaPlayback : 'no', presentationstyle : 'fullscreen', fullscreen : 'yes',

if I use toolbar : 'yes', the page bottom issue will be gone. so this only happens with toolbar = no . I did not have this issue before updating to this version

NiklasMerz commented 4 years ago

@charlesw325 Issues with the grey statusbar are discussed seperately in #546

rajild commented 4 years ago

I have latest version of plugin installed with usewkwebview : "yes"

I found issue with Xcode 11 build running on iOS 13 simulator. InAppBrowser opens and closed without pressing close button freezing the app.

Anybody else facing such issue?

fvadouko commented 4 years ago

I tried to add plugin for my ionic app:

cordova plugin rm cordova-plugin-inappbrowser cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser.git#ba345b01595862173f650266a2e84ec7b4b3549b

then i tried : cordova plugin rm cordova-plugin-inappbrowser cordova plugin add cordova-plugin-inappbrowser@3.1.0

then i added: npm i cordova-plugin-inappbrowser-x

then i removed all and tried : cordova-plugin-inappbrowser 3.1.1-dev Cordova-plugin-ionic-webview 4.1.3

And all the tests were a failure. Plugin not working with IOS 13.2. Anyone could help, please ?

jerviechronix commented 4 years ago

I am using vue-onsen.

I tried to remove and install again cordova-plugin-inappbrowser, then add cordova-plugin-wkwebview-file-xhr

and it works.

ronujohn commented 4 years ago

my app in ionic 3 has been rejected by Apple due to some bugs I found that buttons they were saying having issue was opening external URLS I have tried so many ways to fix this but all of them are not working . Thanks in advance I've pasted the ionic info below Ionic:

ionic (Ionic CLI) : 4.12.0 (C:\Users\Arun\AppData\Roaming\npm\node_modules\i onic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.4

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 8.1.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-i onic-webview 4.1.3, (and 21 other plugins)

NiklasMerz commented 4 years ago

This issue is not intended for support. Please go to Cordova slack for more help.

Did you try to add the latest version from the master branch?

cordova plugin rm cordova-plugin-inappbrowser
cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser.git
cordova platform save
cordova platform rm ios
cordova platform add ios
kyle-n commented 4 years ago

Thank you @NiklasMerz, this worked perfectly!

NiklasMerz commented 4 years ago

Please note this is not an officially released version. It's just the latest development code with this fix. We are working on a new version with this fix, soon.

ctfrancia commented 4 years ago

Is there any update to this? I followed all the various steps and suggestions, however, it just continues to open and close. the only thing that I've gotten it to somewhat work is to have the target be _self however, none of the options are visible, it just shows the image and there is no way to close the in app browser. Also, Ios 6/7 has this issue.

trampi commented 4 years ago

@ctfrancia after fighting with the same issue (still not working with newest IAB version in iOS 13.3), I found out that in our case a third party library for authentication (hello.js) seems to be responsible for it. It seems to have some cordova handling but is not compatible with the new version of IAB.

ctfrancia commented 4 years ago

@trampi hm thanks, I'll take a look into that. I don't believe we have any authentication like that in my app but I'll double-check

msd117 commented 4 years ago

const authWindow = cordova.InAppBrowser.open(getAuthorizationUrl(), '_blank', 'usewkwebview=yes');

Do we have to use the 'usewkwebview=yes' option if we are using wk webview, I can't find that mentioned anywhere in the plugin page

I am facing the same issue in ios 13.5 the in-app browser open for a second then hide or get behind the app and subsequent clicks are ignored

sguillema commented 4 years ago

@msd117 Hey, I had the same issue which popped up on iOS 13.5.

I fixed it by following yoldar's suggestion

Try to add plugin directly from repo:

cordova plugin rm cordova-plugin-inappbrowser cordova plugin add https://github.com/apache/cordova-plugin-inappbrowser.git

mujthab-hyb commented 4 years ago

this code not working in ios build.... cordova.InAppBrowser.open(XXXXX, 'self', 'usewkwebview=yes');

NiklasMerz commented 4 years ago

Please open a new issue if you still have the same issue. We don't really monitor closed issues.