Quasar: openURL to check for SafariViewController when cordova/ios

Created on 9 May 2020  路  2Comments  路  Source: quasarframework/quasar

Is your feature request related to a problem? Please describe.

My cordova project has both cordova plugins InAppBrowser (https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/) and SafariViewController (https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller).

I found that later iOS versions aren't allowing normal functionality of InAppBrowser any longer so replacing it with SafariViewController, which is now Apple's preference, was necessary to open a new browser window successfully.

Describe the solution you'd like

Enhance openURL logic by checking if

  • Platform.is.ios is true
  • window.SafariViewController && window.SafariViewController.isAvailable
  • Use window.SafariViewController.show(options) passing options as default object { url: url }
  • Consider allowing openURL to be passed an alternative object as first argument to allow for options to window.SafariViewController.show. See https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller for usage.
  • Finally, default to window.open for InAppBrowser if SafariViewController is unavailable.

Describe alternatives you've considered
I've attempted all options of existing InAppBrowser and could not get it to work within cordova on iOS.

Additional context
Add any other context or screenshots about the feature request here.

See behavior of InAppBrowser attached
2020-05-09 15 40 01
here

feature request

Most helpful comment

Had a bit of time to squeeze this in. Thank you for the research.
Enhancement will be available in "quasar" v1.11.0.

All 2 comments

Hello. As you already researched this problem can you please help and provide a PR?
Thank you.

Had a bit of time to squeeze this in. Thank you for the research.
Enhancement will be available in "quasar" v1.11.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xereda picture xereda  路  3Comments

alexeigs picture alexeigs  路  3Comments

slowaways picture slowaways  路  3Comments

adwidianjaya picture adwidianjaya  路  3Comments

sskwrl picture sskwrl  路  3Comments