`getCurrentLocation` not working on IOS without timeout
See original GitHub issueOn IOS, if the timeout is not set (default to infinity), the callback will never get called.
I looked into the native code, and I noticed that the recent v5.2.0 changed from locManager.requestLocation()
to locManager.startUpdatingLocation()
, which is also the root cause. I tried to revert the change, and everything works fine again.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:7 (4 by maintainers)
Top Results From Across the Web
navigator.geolocation.getCurrentPosition( ) not woking in IOS
HI , we are using navigator.geolocation.getCurrentPosition(locationSuccess, locationError, {timeout: 5000} to get logged in user location ...
Read more >`navigator.geolocation.getCurrentPosition()` hangs on iOS PWA
getCurrentPosition (resolve, reject, { timeout: 5000, maximumAge: 2000 ... navigator is not standalone , and will therefore work as intended.
Read more >react-native-geolocation-service - npm
React native geolocation service for iOS and android. Why ? This library is created in an attempt to fix the location timeout issue...
Read more >react-native-geolocation-service Code Examples - Snyk
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
Read more >geolocator | Flutter Package - Pub.dev
Geolocation plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API for generic location (GPS etc.) functions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ran into this same thing today. Noticed when my callback wasn’t happening until I added a timeout in the config
Yes I am also facing the same trouble, if I remove the maximumAge it works