cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Fernandes da Fonseca (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-13531) cordova-geolocation not working when using wkwebview on ios11
Date Fri, 03 Nov 2017 01:22:00 GMT

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

Andrea Fernandes da Fonseca updated CB-13531:
---------------------------------------------
    Description: 
I've created two empty cordova projects with latest cordova, cordova-ios and cordova-plugin-geolocation:
- 1) one uses the default UIWebView
- 2) other uses WKWebView

Those are simple starter projects that simply try to get user GPS location using the sample
code provided in cordova-geolocation. (yes, I wait for deviceready)

When I open project (1) everything is fine, I get the pop-up asking me to allow location access
with the message I specify, as expected.
When I open project (2) I don't get the pop-up and cannot access location information.

Tested on latest OSX and latest iOS on iPhone 6S (I cannot test on enviroment other that this)
-----------
To recreate exactly the same conditions:
- create cordova project
- install plugins
- everything is default, except index.js that looks like this:

{{
var app = {
    initialize: function () {
        document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
    },
    onDeviceReady: function () {
        navigator.geolocation.getCurrentPosition(
            function (position) { console.info(position); },
            function (error) { console.error(error); },
            { timeout: 30000 }
        );
    },
};

app.initialize();
}}

  was:
I've created two empty cordova projects with latest cordova, cordova-ios and cordova-plugin-geolocation:
- 1) one uses the default UIWebView
- 2) other uses WKWebView

Those are simple starter projects that simply try to get user GPS location using the sample
code provided in cordova-geolocation. (yes, I wait for deviceready)

When I open project (1) everything is fine, I get the pop-up asking me to allow location access
with the message I specify, as expected.
When I open project (2) I don't get the pop-up and cannot access location information.

Tested on latest OSX and latest iOS on iPhone 6S (I cannot test on enviroment other that this)
-----------
To recreate exactly the same conditions:
- create cordova project
- install plugins
- everything is default, except index.js that looks like this:

{{var app = {
    initialize: function () {
        document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
    },
    onDeviceReady: function () {
        navigator.geolocation.getCurrentPosition(
            function (position) { console.info(position); },
            function (error) { console.error(error); },
            { timeout: 30000 }
        );
    },
};

app.initialize();}}


> cordova-geolocation not working when using wkwebview on ios11
> -------------------------------------------------------------
>
>                 Key: CB-13531
>                 URL: https://issues.apache.org/jira/browse/CB-13531
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-ios, cordova-plugin-geolocation, cordova-plugin-wkwebview-engine
>    Affects Versions: cordova@7.0.0, cordova-ios 4.5.0
>         Environment: OSX 10.12.6
> iOS 11.1
>            Reporter: Andrea Fernandes da Fonseca
>            Assignee: Suraj Pindoria
>            Priority: Major
>
> I've created two empty cordova projects with latest cordova, cordova-ios and cordova-plugin-geolocation:
> - 1) one uses the default UIWebView
> - 2) other uses WKWebView
> Those are simple starter projects that simply try to get user GPS location using the
sample code provided in cordova-geolocation. (yes, I wait for deviceready)
> When I open project (1) everything is fine, I get the pop-up asking me to allow location
access with the message I specify, as expected.
> When I open project (2) I don't get the pop-up and cannot access location information.
> Tested on latest OSX and latest iOS on iPhone 6S (I cannot test on enviroment other that
this)
> -----------
> To recreate exactly the same conditions:
> - create cordova project
> - install plugins
> - everything is default, except index.js that looks like this:
> {{
> var app = {
>     initialize: function () {
>         document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
>     },
>     onDeviceReady: function () {
>         navigator.geolocation.getCurrentPosition(
>             function (position) { console.info(position); },
>             function (error) { console.error(error); },
>             { timeout: 30000 }
>         );
>     },
> };
> app.initialize();
> }}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message