incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-1616) Cordova does not work if current page is not local
Date Wed, 10 Oct 2012 19:01:03 GMT

     [ https://issues.apache.org/jira/browse/CB-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrew Grieve resolved CB-1616.
-------------------------------

    Resolution: Duplicate
      Assignee: Andrew Grieve  (was: Filip Maj)

Dupe of https://issues.apache.org/jira/browse/CB-1525

We do hope to have a release candidate of 2.2 out very soon with a bunch of iOS bugs fixed.
                
> Cordova does not work if current page is not local
> --------------------------------------------------
>
>                 Key: CB-1616
>                 URL: https://issues.apache.org/jira/browse/CB-1616
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS, iOS
>    Affects Versions: 2.1.0
>         Environment: iOS 5.x, 6.x
>            Reporter: Davide Maestroni
>            Assignee: Andrew Grieve
>            Priority: Blocker
>
> I implemented an iOS application using Cordova 2.1.0, which, at startup, loads a remote
web page with the _cordova-2.1.0.js_ file included in a tag "script". In this case the communication
with the device fails and no Cordova plugin is accessible.
> After investigating the issue, I found out the root cause in the following line:
> {noformat}            execXhr.open('HEAD', "file:///!gap_exec", true);{noformat}
> Basically, the problem here is that the above request never reaches the device if the
location of the window does not start with "file://", which is exactly my case.
> In order to fix that, I tried to modify the above line as follows:
> {noformat}            execXhr.open('HEAD', window.location.origin + "/!gap_exec", true);{noformat}
> And now it works great on any iOS device.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message