intuit / LocationManager

Easily get the device's current location on iOS.
MIT License
2.56k stars 387 forks source link

Github documentation contradicts code comments #117

Open sleepylucy opened 5 years ago

sleepylucy commented 5 years ago

I was checking out the documentation for subscribeToLocationUpdates, and I noticed there's a difference between the Readme.md and the comment above the function The Readme.md says:

If an error occurs, the block will execute with a status other than INTULocationStatusSuccess, and the subscription will be kept alive.

Meanwhile the comment above subscribeToSignificantLocationChangesWithBlock reads:

If an error occurs, the block will execute with a status other than INTULocationStatusSuccess, and the subscription will be canceled automatically.

Which one is it now?

lwdupont commented 5 years ago

Hmm.. good question. I will look today and let you know.

sleepylucy commented 5 years ago

Thanks!

lwdupont commented 5 years ago

So, in looking at the documentation vs the code, I believe the read me is correct, and the header comment is wrong.

Calling subscribeToSignificantLocationChangesWithBlock subscribes, meaning in the code it keeps around the block until the caller specifically cancels it.

I'll adjust the comment in the code tomorrow and mention it here (and tag you).

Thanks for bringing this up @sleepylucy 👍