phonegap / phonegap-cli

PhoneGap and PhoneGap/Build command-line interface
Apache License 2.0
491 stars 156 forks source link

Blackberry 10 access origin config.xml issue #173

Closed maximilianhurl closed 11 years ago

maximilianhurl commented 11 years ago

Blackberry expects config.xml access parameters to use uri rather than origin.

But when I run phonegap local build blackberry my parameter <access uri="*" subdomains="true"/> is converted to <access origin="*" subdomains="true" /> which appears to be ignored.

This means that cross domain AJAX does not work at all on Blackberry.

ryanstewart commented 11 years ago

Hi @maximilianhurl are you seeing the same thing with the Cordova CLI?

maximilianhurl commented 11 years ago

I didn't realise they were separate codebases. I will investigate and get back to you.

ryanstewart commented 11 years ago

In theory they're not, we're just leveraging the underlying Cordova CLI. So I'm assuming it's ultimately a Cordova issue, but I'm still getting up to speed on the inner workings of the PhoneGap CLI. I don't have the Blackberry SDK available so if you wouldn't mind checking it, that would be awesome!

You can install the Cordova tools with npm install cordova

maximilianhurl commented 11 years ago

Okay thanks. I'll let you know how I get on.

maximilianhurl commented 11 years ago

@ryanstewart that information about the Cordova CLI being a separate project was just the pointer I needed! I've found exactly how the issue is caused. I've put a temp fix in to this pull request: https://github.com/apache/cordova-cli/pull/45

Feel free to implement it differently. Let me know if what someone to do some testing.

maximilianhurl commented 11 years ago

As this is an issue with Cordova cli and I've been told will be fixed soon I'm going to close this for now.

maxpavlov commented 10 years ago

Any idea if this has been fixed yet?

maximilianhurl commented 10 years ago

It appears that this has now finally been fixed. One thing to note is the URI syntax in the config.xml. See http://stackoverflow.com/questions/20506440/phonegap-3-2-blackberry10-cross-origin-access-is-not-allowed for more information.