[
https://issues.apache.org/jira/browse/CB-14143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pablo Cantero updated CB-14143:
-------------------------------
Description:
I generated an iOS and Android Pollyfill for my PWA app with
[PWAbuilder|https://www.pwabuilder.com/]. It is working great on Android, but
I'm running into an issue with the iOS one.
I want external links to open in the external browser, so I added this
`allow-intent`:
{code:java}
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />{code}
This worked fine, if I click on any external link
(**not-under-my-domain.com**), it opens in the external browser.
For opening **my-domain.com** within the app, I added
{code:java}
<allow-navigation hap-rule="yes" href="*://my-domain.com/*" />
{code}
{{}}According to the docs, `allow-navigation` should take precedence over
`allow-intent`, but it does not seem to be working.
My app first page opens fine within the app, but then if I click on any link
**/other-page**, it opens in the external browser, then if I remove the
`allow-intent`, when I click on any external link
(**not-under-my-domain.com**), it gives the error:
{code:java}
Internal navigation rejected - <allow-navigation> not set for url='...
{code}
I would like to have any link not defined in `allow-navigation` to open in the
external browser, and all others (under **my-domain.com**) within the app.
Any ideas?
was:
I generated an iOS and Android Pollyfill for my PWA app with
[PWAbuilder|https://www.pwabuilder.com/]. It is working great on Android, but
I'm running into an issue with the iOS one.
I want external links to open in the external browser, so I added this
`allow-intent`:
```
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
```
This worked fine, if I click on any external link
(**not-under-my-domain.com**), it opens in the external browser.
For opening **my-domain.com** within the app, I added
{{<allow-navigation hap-rule="yes" href="*://my-domain.com/*" />}}
According to the docs, `allow-navigation` should take precedence over
`allow-intent`, but it does not seem to be working.
My app first page opens fine within the app, but then if I click on any link
**/other-page**, it opens in the external browser, then if I remove the
`allow-intent`, when I click on any external link
(**not-under-my-domain.com**), it gives the error:
Internal navigation rejected - <allow-navigation> not set for url='...
I would like to have any link not defined in `allow-navigation` to open in the
external browser, and all others (under **my-domain.com**) within the app.
Any ideas?
> allow-navigation isn't taking precedence over allow-intent on iOS
> -----------------------------------------------------------------
>
> Key: CB-14143
> URL: https://issues.apache.org/jira/browse/CB-14143
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-plugin-whitelist
> Environment: cordova-plugin-whitelist version 1.3.3
> Reporter: Pablo Cantero
> Priority: Major
>
> I generated an iOS and Android Pollyfill for my PWA app with
> [PWAbuilder|https://www.pwabuilder.com/]. It is working great on Android, but
> I'm running into an issue with the iOS one.
> I want external links to open in the external browser, so I added this
> `allow-intent`:
> {code:java}
> <allow-intent href="http://*/*" />
> <allow-intent href="https://*/*" />{code}
> This worked fine, if I click on any external link
> (**not-under-my-domain.com**), it opens in the external browser.
> For opening **my-domain.com** within the app, I added
>
> {code:java}
> <allow-navigation hap-rule="yes" href="*://my-domain.com/*" />
> {code}
> {{}}According to the docs, `allow-navigation` should take precedence over
> `allow-intent`, but it does not seem to be working.
> My app first page opens fine within the app, but then if I click on any link
> **/other-page**, it opens in the external browser, then if I remove the
> `allow-intent`, when I click on any external link
> (**not-under-my-domain.com**), it gives the error:
>
> {code:java}
> Internal navigation rejected - <allow-navigation> not set for url='...
> {code}
> I would like to have any link not defined in `allow-navigation` to open in
> the external browser, and all others (under **my-domain.com**) within the app.
> Any ideas?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]