Internal navigation rejected: <allow-navigation not set> in Cordova on iOS

I have built an iOS app using Cordova. The app tries to load a web page e.g. in index.html. But, the page stays white blank with error in console "Internal navigation rejected - <allow-navigation> not set for url=''".

I have already set <access origin="" subdomains="true" /> and also tried by setting <allow-navigation> tag. But the page stays blank. am I missing anything else? Please guide.

After adding the following meta tag in index.html, the "internal navigation error" has gone, but the page is still white blank. :(

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script src: 'self' 'unsafe-inline' 'unsafe-eval'">


I was having this problem and it turns out there are two config.xml files. The first one is in Xcode, but you have to edit the second one from the filesystem.



I added

<allow-navigation href="*" /> 

to both of them and it worked. Using 6.3.0.

You have to add this line to your config.xml

<allow-navigation href="" />

or this one if you want to allow the navigation to all the urls on

<allow-navigation href="*" />

It's not recommend to open a url in your base web view. Use the cordova-plugin-inappbrowser and call the inappbrowser to open outer url:

function open_outer_url(url){
    if(window.cordova && window.cordova.InAppBrowser){, "_blank", 'location=no');

Thanks for the pointer. The solution

<allow-navigation href="about:" />

caused a cordova prepare error for me. I need to use the following instead:

<allow-navigation href="about:*" />

It is a scheme used internally, just allow access/navigation to it:

<access origin="about:*" />
<allow-navigation href="about:" />

It is not recommended to use

<access origin="*" />
<allow-navigation href="*" />

as described in cordova-plugin-whitelist.

Need Your Help

How can I copy a TFS 2010 Build Definition?

tfs tfs2010 team-build

Is there any way to copy a build definition? I work in a mainline source control methodology which utilizes many different branches that live for very short periods (ie. a few days to a week). I'd

How to compare dates in Java?

java date comparison

How do I compare dates in between in Java?