Closed phil-andrews closed 5 years ago
Yes, this is because of rate limits you are hitting, 60 requests per hour per user, details here - https://radar.io/documentation/sdk#ios-foreground
I would suggest not using Radar for this type of high power and high frequency use case. The SDK really shines when reacting to changes in user context like entering or exiting geofences, places, etc. You can read more about Radar here - https://radar.io/documentation
Something other than ERROR_UNKNOWN
would be pretty useful in that situation. It's difficult to decipher where that rate limit applies to the trackOnce
call within the SDK as I wasn't using the REST API. I'm not sure how I would have found it without posting here.
Yeah, looks like that error string is simply missing from the iOS error codes on the React Native side. We will add this in the next release, thanks for the heads up!
Since the React Native module uses the native modules under the hood, the rate limits for trackOnce documented here still apply: https://radar.io/documentation/sdk#ios-foreground
Thanks man. I appreciate the quick responses.
I need a finer grained GPS location so instead of using background tracking I call trackOnce every 3-5 seconds to get the most recent coordinates of a users device. During testing on a real device while walking around outside, after about 2-3 minutes or 60 updates trackOnce starts throwing
UNKNOWN_ERROR
updates. It's always right around update number 60.The error is persistent even through app restarts. I have to delete the app entirely than build and run again to get the error to go aways.
Steps to reproduce the behavior:
Expected behavior A normal location update on calling
trackOnce
."react-native": "0.57.8", "react-native-radar": "^2.1.2" emulator XR xCode 10