I have had experience developing cross platform mobile apps with Visual Studio and Apache Cordova but this is my first time trying to integrate web widgets into my app. I am using things like the twitter widget and a few others that are run through iframe and script tags and while they show up on the visual studio browser simulator, they do not show up on an iOS device when I install the app on it.
I have found a workaround to the twitter widget thanks to other people with my same question, but I wanted to know why the other web widgets aren't working on my iOS device. Is there some security setting or configuration setting I could change in order for the app to run these widgets on an iOS device?
Cordova apps don't allow internal navigation to external sites, so iframes don't work unless you explicitly allow the navigation to those sites.
To allow the navigation you have to add some allow-navigation
tags in your config.xml like this:
<allow-navigation href="http://example.com/*" />
And if you have a Content-Security-Policy meta tag you also have to allow the iframe navigation like this:
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src 'self' http://example.com">