Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using allow-navigation impacts allow-intent on iOS #1285

Open
El-Tommy opened this issue Feb 8, 2023 · 1 comment
Open

Using allow-navigation impacts allow-intent on iOS #1285

El-Tommy opened this issue Feb 8, 2023 · 1 comment

Comments

@El-Tommy
Copy link

El-Tommy commented Feb 8, 2023

In my app I have some links with the tag <a href=""> and also with javascript with the code below.

let url = param;
window.open(url, '_system');

My config.xml is configured as below, and opening links works perfectly, when clicking on a link or executing the window.open function, it opens Safari and the URL together.

<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />

However, as I need to display some videos from YouTube and Vimeo (iframe), I needed to add the allow-navigation tag, but when I do that, the allow-intent setting is ignored and all links start opening inside the app.

<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />

<allow-navigation href="https://*youtube.com/*"/>
<allow-navigation href="https://*vimeo.com/*" />

I use https://*/* because the user can make infinite URLs available and so it would be interesting for him to be able to open any one.

I don't know if this is a bug or my fault.

  • Cordova: 11.1.0
  • Cordova iOS: 6.2.0
@El-Tommy
Copy link
Author

El-Tommy commented Feb 9, 2023

One option would be to go through all the static and dynamic links (which come via AJAX requests) and add an onClick event to use the inAppBrowser with _system, but I don't know how to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant