-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: System.TimeoutException: 'Could not retrieve latest GPS coordinates to be able to determine geofence current state' for iOS #1544
Comments
This isn't a bug. That call times out after 20 seconds of waiting for the GPS reply. If the GPS can't get a fix, this will happen. You can see the code here:
I could extend the timeout or base it completely off the cancellation token if you think that would help!? |
I have tried this with multiple different devices running different versions of iOS, and multiple apps I have created, and I get this exception with all of them, none of them can get a GPS fix. When using different methods for getting the GPS position of the device, there is no problem getting coordinates. I have not seen this problem with Android, only iOS. |
Also when viewing the source in Vs2022, it complains that CLCircularRegion is deprecated - https://developer.apple.com/documentation/corelocation/clcircularregion , but im not sure thats relevant here. |
It's only recently been marked deprecated. I haven't updated to whatever the new mechanism is. It won't be required until iOS 19 likely. |
Also another note, since it can't get the GPS fix, the geofencing is also not working, OnStatusChanged is never triggered even though the geofence shows up in the list for monitored regions. |
Getting the current status of the geofence doesn't have anything to do with the delegate firing. I'm running geofencing on iOS without issues right now. What is your test case? Are you testing in sim? Are you actually testing with a device? |
I am testing on a device. |
Component/Nuget
GPS or Geofencing (Shiny.Locations)
What operating system(s) are effected?
Version(s) of Operation Systems
iOS 15, iOS 18
Hosting Model
Steps To Reproduce
Create a new project with the Shiny template in Visual Studio with Geofencing
Add new geofence
Request state of geofence
Expected Behavior
Expected behavior is for this to show if the phone is inside or outside the monitored geofence.
Actual Behavior
This results in an exception: System.TimeoutException: 'Could not retrieve latest GPS coordinates to be able to determine geofence current state' when running on iOS.
Exception or Log output
System.TimeoutException: 'Could not retrieve latest GPS coordinates to be able to determine geofence current state'
Code Sample
https://github.com/hannerygge/Project2
Code of Conduct
The text was updated successfully, but these errors were encountered: