iOS 18: Slow in getting a position from getPositionStream
Recently I have been receiving numerous feedback that it's difficult to detect location and when I tried debugging, it seems that getPositionStream is very slow in returning a value. I have tested on iOS 17 and iOS 18, it was fast on iOS 17 (almost immediate) but it takes a long time on iOS 18 (may exceed a min). However, on third party apps (Waze, Google Map) for both version, the location updates seem to be working fine.
I was wondering am I the only one experiencing this?
Not only does it happen on iOS, but I have also found the same issue on Android, where sometimes it takes as long as 10 minutes to get a correct location update even with distanceFilter=0.
same here
@Ellynnn @RafaelRV4rgas
I encountered this issue as well. In my case, the problem was related to using background location tracking on iOS. When my app was actively tracking GPS in the background, attempting to get coordinates using the geolocator in the foreground would take 1-2 minutes, sometimes stretching up to 5 minutes.
My solution was to use getLastKnownPosition() to retrieve the last available coordinates and then call the streaming version instead of getCurrentPosition(), which improved the situation somewhat. Additionally, when I paused or stopped the background GPS tracking service, getCurrentPosition() would respond much faster and more accurately.
Perhaps you're experiencing a similar issue - might be worth checking if you have any background location services running. This approach helped resolve my problem.
@axmadjon I'm already using the streaming version instead of getCurrentPosition(). It's weird that i keep getting feedback from users that their location cannot be detected but when i try on my side, it doesn't seems to have any issues at all