This is a migrated thread and some comments may be shown as answers.

Loading external webpages in iFrames

3 Answers 159 Views
Show your code
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nikolaus
Top achievements
Rank 1
Nikolaus asked on 27 Apr 2017, 10:06 AM

Hi,

I'm trying to load a page in an iFrame, but the iFrame just remains blank. I tried links in my local network, and external ones, but neither worked. I found the following tutorial: http://docs.telerik.com/platform/knowledge-base/troubleshooting/troubleshooting-ios-cannot-load-iframe

However, even after following those steps, it didn't work.

I added <allow-navigation href="*" /> but it had no effect (<feature name="IntentAndNavigationFilter"> was already in my ios config).

Next I tried the Cordova-proposed solution: https://cordova.apache.org/docs/en/latest/guide/appdev/whitelist/

I added <access origin="*" subdomains="true" /> but this also had no effect.

Could anyone help me with this? Am I doing something wrong in my Config, or is there some additional setting I'm missing?

3 Answers, 1 is accepted

Sort by
0
Nikolaus
Top achievements
Rank 1
answered on 27 Apr 2017, 11:23 AM

I also tried adding a content security policy header to my layout page (index.html), but that didn't work either. It makes my app render blank, until I switch to another app and switch back again.

<meta http-equiv="Content-Security-Policy" content="default-src 'unsafe-inline' 'unsafe-eval' *">

0
Nikolaus
Top achievements
Rank 1
answered on 27 Apr 2017, 11:51 AM
I also just tested this on Android. It worked out of the box on Android (without the content security policy header), and I didn't have to change anything in the config file. So it seems the issue only exists on iOS (tested on latest iOS version).
0
Garo
Telerik team
answered on 02 May 2017, 09:07 AM
Hello Nikolaus,

I am unable to reproduce this behavior on my side. I have created a sample app and made the modifications recommended by this KB article. I tested the app on an iOS 10.3.1 device and it is working as expected. I have attached the sample app to this ticket for your reference.

I hope this helps.

Regards,
Garo
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Show your code
Asked by
Nikolaus
Top achievements
Rank 1
Answers by
Nikolaus
Top achievements
Rank 1
Garo
Telerik team
Share this question
or