Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-14143

allow-navigation isn't taking precedence over allow-intent on iOS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • cordova-plugin-whitelist version 1.3.3

    Description

      I generated an iOS and Android Pollyfill for my PWA app with PWAbuilder. 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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            phstc Pablo Cantero
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: