I’m trying to link to a Servoy NG Solution, using an iframe in a Phonegap app. The iframe is coming up blank and i’ve been looking at the Adobe forums trying to find what i’m doing wrong. After making sure i’m doing everything right on the Phonegap side of things I thought maybe there is a unique condition when a Servoy solution is being called to and perhaps someone here might know more about it.
I got the answer from a guy on the Phonegap forum, I’d forgotton to include the cordova-whitelist-plugin which solved my problem and displayed the solution in the iframe.
Thomas.shuttleworth:
I got the answer from a guy on the Phonegap forum, I’d forgotton to include the cordova-whitelist-plugin which solved my problem and displayed the solution in the iframe.
Could you please provide the lines you had to put into your
config.xml
and
index.html
to get it to work & solve the problem?
Thanks
Rafi
Hi Rafi, the problem I was having with iframe was fixed by the addition of to the config.xml. By this point I had tried a number of things to get the iframe working. I’m not sure if the problem you’re having is the same issue but I’m unable to add my files here for your review. I’ll post some files in this message that had a working iframe which hopefully you can use to help with your issue.
The latter is responsible for attaching that Bridge object.
Those two scripts come from a project on github (https://github.com/Servoy/svyPhonegap) that we have created to ease the integration of phonegap and NG Client. Many times, people do not only want to simply run their application inside PhoneGap, but also make use of the different APIs that are offered or can be added to a PhoneGap solution.
So in short: to simply run your application, remove the onload call you most likely copied. To further integrate with PhoneGap, check out https://github.com/Servoy/svyPhonegap
It’s impossible to figure out what’s going on like this. You are loading a bunch of scripts, execute client code onLoad, your solution might do all kinds of stuff onSolutionOpen etc.
In general when working with PhoneGap, it is very helpful to connect the device to a PC and inspect the running phonegap solution using Chrome developer tools on the PC. Google a bit to figure out how to set that up, sometimes a device driver is needed for that. While that might take a while to get it working, you will benefit a lot on the long run when you can see what goes on in the browser of the PhoneGap app.
It could also help maybe to simply run this html page locally to see what goes on in Chrome developer tools. Obviously, you need to remove any phonegap specific stuff, since you don’t have that, but you can figure out the iframe portion.