Reputation: 9005
I have a jquery mobile app that i am trying to wrap in phonegap, and everything is working fine except for behavior of an iframe. outside of PhoneGap, the behavior works as expected.
Now i have imported the project into Xcode/Phonegap
On the ios simulator (or phone), the device now opens up a new browser window instead of just behaving like a typical iframe works.
i have an iframe which essentially gets loaded like this: $('#myiframe').attr("src", 'http://www.myurl.com'); $('#myiframe').load( alert('frame loaded');
I've heard about adding a config.xml file to my xcode project but I haven't been able to find a firm solution.
Please help thanks!
Upvotes: 2
Views: 536
Reputation: 11
You'll have to add the src domain under the ExternalHosts key in PhoneGap.plist. Note - if the domain you put as the iframe src is re-directed, you will need to add that domain in the ExternalHosts key as well. For example, in Canada, www.google.com re-directs to www.google.ca, so you will have to add that domain as well. Another example, phonegap.com re-directs to www.phonegap.com. This domain value must be exact, wild-card support is not available.
Upvotes: 1