Phonegap Blackberry build error for cross domain - blackberry

When i build my application from phonegap. It works in iPhone, iPad, Android but didn't work in blackberry.
I'm calling cross domain API WSDL.
In blackberry it gives error
URL (exmple :- http://google.com)- could not be retrieved because it was not found in config.xml.
Please verify the <access> elements in the WebWorks config. Contact your service provider if the problem persists.
I have to use in config.xml
<access subdomains="true" uri="*" /> OR <access origin="*" />
?

Last time I had this issue it seems all URL's have to be explicit for BB. If your URL is unknown at runtime (For instance, a user entered URL), The only way around it would be
<feature id="blackberry.app" >
<param name="websecurity" value="disable" />

Related

Ionic WKWeabView breaks Template on iOS

I was trying to publish my application on Apple Store, but they blocked it since UIWebView was detected. I found no “UIWebView” occurrences in the project, but the application is still being blocked by the Store.
I found on the Internet that I had to install WKWebView using the following command:
$ ionic cordova plugin install cordova-plugin-ionic-webview --save
Then I had to fix the config.xml in the following way:
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
The application starts, but when I do a GET on a page and try to display the response I have the following result: https://imgur.com/a/uaBWZOf
The first card is static, while the others are dynamic: the static card is displayed correctly, while the dynamic ones are displayed only opening the side menu or clicking the filters. No chance to get the dynamic content on the opening of the page.
The code that generates dynamic content is correct since it runs correctly on Android side and on iOS side without WKWebView installed too.
Ionic version: 6.17.1
Cordova version: 7.1.0
Any idea of what could be what could cause the card problem and how to fix it?

plugin plugin.google.maps using phonegap build service doesnt work on ios

i have a small project using the plugin plugin.google.maps (https://github.com/wf9a5m75/phonegap-googlemaps-plugin) .
Also, i use phonegap buid service, not CLI.
In config.xml file i have the code
<gap:plugin name="plugin.google.maps" source="plugins.cordova.io" version="~1.2.4">
<param name="API_KEY_FOR_ANDROID" value="xxx" />
<param name="API_KEY_FOR_IOS" value="xxx" />
</gap:plugin>
Android apk's works like a charm, but on ios device i get the message
"Api key is not setted.
Please replace 'API_KEY_FOR_IOS' in the platforms/ios/.../...Info.plist with your API key."
Does anyone have a clue how i can solve this using the phonegap build service?
Despite the fact that this was supposed to work
(https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/411#issuecomment-75452290)
after a couple of days in a nutshell i figured that i had to override the instructions for ios property list for the plist key "Google Maps API Key".
So, in config.xml i inserted the code:
<gap:config-file platform="ios" parent="Google Maps API Key" mode="replace">
<string>xxx</string>
</gap:config-file>
where xxx is the Google Maps API Key for iOS
http://docs.build.phonegap.com/en_US/configuring_config_file_element.md.html

Phonegap Google Maps and whitelist rejection

I'm using Xcode to build an iOS app..
I'm trying to get google maps working on Phonegap 3.x but in the debug window it says:
2014-05-22 15:05:14.789 foo[9345:4503] ERROR whitelist
rejection:
url='https://maps.googleapis.com/maps/api/js?key=XXX&sensor=true'
Config.xml:
<access origin="*" />
I've tried this as well:
<access origin="*.googleapis.com" />
my-app.plist:
ExternalHosts | (String) | *
It doesn't seem to work at all!
Any ideas?
Solved!
In Xcode you can see the config.xml.. HOWEVER, it isn't the right config.xml.
The file to search for is here /path-to-app/platforms/ios/appname/config.xml
Just added:
<access origin="*" />
And woila!!
Hope this will help you to!

Embedded Twitter timeline in PhoneGap 3.1.0 application

I have an issue with integrating Twitter timeline with PhoneGap 3.1.0 application (iOS version)
1) I have generated a new PhoneGap 3.1.0 application
2) Have added iOS version
3) I have generated a timeline widget in Twitter
4) Have pasted the code from Twitter widget into the page:
index.html:
<a class="twitter-timeline" href="https://twitter.com/bill_hallam" data-widget-id="399136844954087424">Tweets by #bill_hallam</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
5) Have whitelisted twitter domains:
config.xml:
<access origin="https://twitter.com" subdomains="true" />
<access origin="http://twitter.com" subdomains="true" />
<access origin="http://platform.twitter.com" />
<access origin="https://platform.twitter.com" />
<access origin="https://cdn.syndication.twimg.com" />
<access origin="http://cdn.syndication.twimg.com" />
6) Started the iOS emulator from Xcode
Result: The page is blank. Safari Develop console shows that twitter <iframe> tag is embedded in the page. All js/css files retrieved successfully. None if them was blacklisted.
Does anyone have succesfull experience integrating Twitter timeline into PhoneGap 3.1 app?
Update Nov 29 2016
This is most probably not the issue the OP faced back then, but if anyone faces the same issue these days (using Cordova 6.4.0, as of Nov 29 2016), the answer is to add:
<allow-navigation href="about:*" />
to your config.xml.
This is required to be able to open the about:blank URL initially used by the iframe set up by the Twitter timeline widget.
I have finally figured out a way to do that.
Unfortunately at the moment the only solution I have found is using an InAppBrowser plugin.
But it works for both - iOS and Android versions.
The detailed description is here
I have created a small public page, that functions as a service.

Phonegap 3.1 won't load external content, despite it being explicitly set

I realise this is a common problem and has been asked many times, however I do feel that no other answers work in this instance.
I have a basic PhoneGap application that works fine in browser, on the Android simulator, on Android devices in the XCode/iOS simulator. It does not work, however, on iOS devices. When adding external libraries the app essentially hangs. It doesn't crash, but tries to load it forever more, leaving a blank white screen.
I know this is a common problem, fixed by amending the config.xml to whitelist URLs, which I believe I have done, but I still get the same problem.
My config.xml has the following entry:
<access origin="*" subdomains="true" />
I have also tried the following:
<access origin="*" />
<access origin="*" subdomains="true" />
<access origin=".*" />
<access origin=".*" subdomains="true" />
All together and on their own, with no luck. After building to iOS (phonegap local build ios) I have also 'prepared' all of the plugins (cordova prepare).
I have tried several libraries, from various CDNs such as Google CDN and jQuery CDN. I have also tried adding an iframe with the following:
<iframe src="http://google.co.uk" width="250" height="500"></iframe>
Which gives me a blank iframe.
If I look at the build in XCode and look at the generated platform-specific config.xml files I can see the same access XML as expected.
I am using the below versions:
Phonegap 3.1.0-0.15.0
XCode 5.0
OSX 10.8.5
iOS 6.1.3 (iPod Touch)
iOS Simulator for iOS 7
Any help is much appreciated.

Resources