It's hard to help you if you don't show your code.
If by "Phonegap Simulator" you mean the Phonegap Developer app, it doesn't work the exact same way as your app will work, so you have to do some extra things to get everything working, like configure the whitelist and the CSP. So at least show your config.xml and your index.html
ok, so here goes
this line is in my index.html
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
I believe this meta is the CSP allowing all connections
this is my config.xml
<?xml version='1.0' encoding='utf-8'?>
A blank PhoneGap app.
<content src="index.html" />
<access origin="*" />
if I'm missing something plz help, when I added that CSP line it removed the functionality of my bootstrap buttons.
Are you using a local jQuery file or loading it from a CDN?
I think it's better if you also provide the index.html and explain better what "is not working"
I am using a local jquery file.
The index.html is a very large file, but what is not working is anything that needs to reach externally to work must be being blocked, I have ajax requests that aren't working and I have multiple iframes that are reaching to various websites (soundcloud). It just seems as if the app is not allowed to reach to the web to make requests to any website.
1 person found this helpful
For the connections you will need to edit the Content-Security-Policy to allow those connections, you can do it one by one by adding them to the default-src or adding a new connect-src, or by adding * to the default-src or to the connect-src to allow all connections to external sites.
For the iframes you have to allow the navigation by using the allow-navigation tag and installing cordova-plugin-whitelist
Here you can read more about the whitelist and how to use the allow-navigation tags and how to configure the Content-Security-Policy
I had to add the whitelist plugin. I didn't realize that.