You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/05/02 14:16:53 UTC

[GitHub] [cordova-plugin-geolocation] katzlbt opened a new issue #226: iOS 14: Changing authorization in Settings (suspended App) fails to transmit PositionError

katzlbt opened a new issue #226:
URL: https://github.com/apache/cordova-plugin-geolocation/issues/226


   # Problem
   
   Changing authorization in Settings to denied (when the App is suspended) fails to transmit PositionError to the WebView
   (found this while testing #224 as I noticed the PERMISSION_DENIED message was not transmitted to the WebView)
   
   ### What is expected to happen?
   
   navigator.geolocation.watchPosition() the error handler is called with PositionError.PERMISSION_DENIED
   
   ### What does actually happen?
   
   navigator.geolocation.watchPosition() the error handler is not called at all.
   
   ## Diagnosis
   
   1. - locationManager: didFailWithError: is correctly called, but it is called **while the app is in the background**!
   2. `[CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:posError]` executes without error
   2. The CDVWebView does not seem to receive anything or JS does not work while in background
   3. CDVWebViewEngine shouldReloadWebView:: is executed after the app has resumed (not sure what that does)
   4. geolocation is stopped without notice/error to the web-view code as errors are not delivered
   
   This is quite difficult to fix.
   **Is there a way to send command-results delayed after the app resumes?**
   
   ### Environment, Platform, Device
   cordova-plugin-geolocation HEAD, iOS 14
   


-- 
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



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