You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/12/04 08:00:21 UTC

[GitHub] tavor8 opened a new issue #133: navigator.geolocation.getCurrentPosition always got Timeout expired on iOS simulator

tavor8 opened a new issue #133: navigator.geolocation.getCurrentPosition always got Timeout expired on iOS simulator
URL: https://github.com/apache/cordova-plugin-geolocation/issues/133
 
 
   Hi, the geolocation is not working on ios simulator, I always get the same Timeout expired message,  and my code is very simple as following, and it works fine in Chrome , Safari browsers and also Android simulator.
   
    `   self.handleGetLoc = function()
       {
        navigator.geolocation.getCurrentPosition(
   		function(position) {
              		 alert('Latitude: '          + position.coords.latitude          + '\n' +
                		 'Longitude: '         + position.coords.longitude         + '\n');
                   },
                   function(error) 
   		{
          			 console.log('code: '    + error.code    + '\n' +
                		 'message: ' + error.message + '\n’);
   		},
                   {enableHighAccuracy: true, timeout: 2000, maximumAge: 1000, accuracy:10});
       };`
   
   And it keep printing:
   `code: 3
   message: Timeout expired`
   
   
   Relevant component versions:
           "cordova-ios": "4.5.5",
           "cordova-plugin-file": "6.0.1",
           "cordova-plugin-geolocation": "4.0.1",
           "cordova-plugin-whitelist": "^1.3.3"
   
   ios simulator: iPhone 6 or iPhone X, and all others.
   ios :12.1
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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