setdirection/ios-shared — pull request #114 by steveriggins (2014-08-19 17:52:57+00:00)
Title: Refactor SDLocationManager

We noticed after the delegate changes to SDLocationManage that there was some API abuse as well as issues where the location manager would never finish locating. To correct and coral our usage of SDLocationManager, this pull request changes the following:

1) SDLocationManager now inherits from NSObject
2) SDLocationManager composes itself with a CLLocationManager instance
3) +instance was replaced by +sharedInstance
4) Unimplemented APIs were removed (vs. commented with warnings)
5) Deprecations in the header were removed
6) You can no longer set the locationAccuracy etc directly. Use the supplied start.... APIs
7) Fixed a bug where we were not considering horizontalAccuracy < 0 to be a failure
8) Fixed a bug where we were considering horizontalAccuracy >= desiredAccuracy as a fail (vs >)
9) The location was always being set AFTER the location manager started running because of the queuing. When the queue that changes the accuracy runs, we now stop the location manager and start it back up if it was previously running, just to ensure it was started AFTER the accuracy was set. There may be a more elegant fix, but because of the concurrent queues, I wanted to touch John's logic as little as possible.