9.1 C
Tuesday, February 13, 2024

ios – allow-intent hyperlinks not opening externally

I am making an attempt to specify which hyperlinks in my Cordova app ought to open inside the Cordova app and which ought to open externally. I would like social media hyperlinks to open externally, and in addition any hyperlink that ends with .pdf. My config.xml has the next guidelines:

<entry origin="*" />
<allow-intent href="https://my-domain.com/*.pdf" launch-external="sure" />
<allow-intent href="http://*/*" launch-external="sure" />
<allow-intent href="https://*/*" />
<allow-intent href="https://fb.com/*" launch-external="sure" />
<allow-intent href="https://twitter.com/*" launch-external="sure" />
<allow-intent href="https://instagram.com/*" launch-external="sure" />
<allow-intent href="https://*.fb.com/*" launch-external="sure" />
<allow-intent href="https://*.twitter.com/*" launch-external="sure" />
<allow-intent href="https://*.instagram.com/*" launch-external="sure" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-navigation href="http://my-domain.com" />

From the examples I can discover on-line, this config ought to trigger the next behaviour:

  1. An a hyperlink with href="https://my-domain.com/profile" ought to open inside the app
  2. An a hyperlink with href="https://fb.com/myPage" ought to open externally, in no matter app the gadget has configured to open fb.com hyperlinks (so the official Fb app or an internet browser)
  3. An a hyperlink with href="https://my-domain.com/instance.pdf" ought to open externally, in no matter app the gadget has to configured to open PDF information.

Nonetheless on iOS in all these examples, the hyperlinks open inside the Cordova browser. What am I doing mistaken?

Latest news
Related news


Please enter your comment!
Please enter your name here