Cant load iframe on phone

When I run my ionic app on the browser, the iframe load, but it does not load when I run it on phone.

I’m using the plugin

I’m already put in my config.xml:

  <allow-navigation href="*" />

  <allow-navigation href="*://**" />
  <allow-navigation href="http://*/*" />
  <allow-navigation href="https://*/*" />
  <allow-navigation href="data:*" />

  <access origin="*"/>

  <!-- Allow links to web pages to open in a browser -->
  <allow-intent href="http://*/*" />
  <allow-intent href="https://*/*" />

Anyway, the iframe still not load in the view when I run the app on the phone.

Anyone else got this problem?


What are these &apos; ?

It was the type of encoding from where I get the code.

The named character reference ' (the apostrophe, U+0027) was introduced in XML 1.0 but does not appear in HTML. Authors should therefore use ' instead of ' to work as expected in HTML 4 user agents.

I’m already take it off to test, and now I’m working just with the config.xml, like the plugin documentation says to do.

:slight_smile: I knew this HTML entity, I was just asking why they were there because they should not.

What do you see in console when remote debugging your app on phone?

My bad. Sorry =D

My console dont show any erros. He just don’t load the iframe. I’m also using Ionic view app for sync and test it on phone

My app would work on emulation and device with Xcode, and ionic view, but not with ionic emulation or device run. Then I added

<allow-navigation href="*"/>

to config.xml and it worked on all these platforms. Allowing navigation everywhere was not recommended (for security reasons I don’t understand), so I was looking for something more specific and noticed ionic temporarily changed the content tag to

<content src="" original-src="index.html"/>

during emulation and device run. So I replaced the allow-navigation element with

<allow-navigation href=""/>

which works and presumably doesn’t have security issues.

A bit of downside is that either content element above keeps Xcode from running the app. Generally I prefer ionic for device and emulation testing, since it’s easy to see $log and some system messages (which I don’t see in Xcode, though maybe I need to be informed about how to better use Xcode). The Xcode console, however, displays messages the ionic doesn’t, which can be invaluable on rare occasions. If I’m missing a way to see the Xcode console messages in an ionic run, someone please enlighten me.