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 2019/04/21 17:03:18 UTC

[GitHub] [cordova-plugin-geolocation] ironbone opened a new issue #151: iOS watchPosition problem

ironbone opened a new issue #151: iOS watchPosition problem 
URL: https://github.com/apache/cordova-plugin-geolocation/issues/151
 
 
   # Bug Report
   
   ## Problem
   The function in subscribe in watchPosition is not called when the user does not touch the screen (or interact with the application) even if the position has changed
   
   ### What is expected to happen?
   Every time when the position has changed the function should be called.
   
   ### What does actually happen?
   When subscribing to  the watchPosition the  event function is first called 2-3 times. Then during the application stay in the foreground the event function is not called. There are no errors.
   
   When the user touch the screen (sometimes) the function is called. Every time when the application goes to background and return to the foreground the function is called twice.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   iOS 12.1
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Ionic:
   
      ionic (Ionic CLI)             : 4.12.0 (/usr/local/lib/node_modules/ionic)
      Ionic Framework               : @ionic/angular 4.2.0
      @angular-devkit/build-angular : 0.13.8
      @angular-devkit/schematics    : 7.2.4
      @angular/cli                  : 7.3.8
      @ionic/angular-toolkit        : 1.4.1
   
   Cordova:
   
      cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
      Cordova Platforms     : ios 5.0.0
      Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 5 other plugins)
   
   System:
   
      Android SDK Tools : 25.2.5 (/Applications/android-sdks)
      ios-sim           : 7.0.0
      NodeJS            : v10.15.3 (/usr/local/bin/node)
      npm               : 6.9.0
      OS                : macOS Mojave
      Xcode             : Xcode 10.2 Build version 10E125
   
   Code written in Ionic 4.
   ```
   this.watch = this.geolocation.watchPosition();
   this.watch.subscribe(
               (data) => {
                   console.log("In watchPosition");
                   console.log(data);
                   this.data = data;
               },
               (error) => {
                   console.log('Error watching location', error)
               }, 
               {
                   maximumAge: 3000,
                   timeout: 1000,
                   enableHighAccuracy: true
               }
           );
   ```
   
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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