LocoKit
LocoKit copied to clipboard
CLLocationManager thread safety
If CLLocationManager should be created on the main thread or problems can occur. Here's the error message that is received when not created on the main thread.
A location manager (0x106634fc0) was created on a dispatch queue executing on a thread other than the main thread. It is the developer's responsibility to ensure that there is a run loop running on the thread on which the location manager object is allocated. In particular, creating location managers in arbitrary dispatch queues (not attached to the main queue) is not supported and will result in callbacks not being received.
A few hours was waisted figuring what was wrong with my app until I discovered this error message in my logs.
This pull request guarantees that CLLocationManager is always created on the main thread.
@sobri909 Any word on this? There have been many commits since creating this.