sparrowcode / PermissionsKit

Universal API for request permission and get its statuses.
https://x.com/sparrowcode_ios
MIT License
5.64k stars 462 forks source link

CLLocationManager created in wrong thread #38

Closed rostopira closed 6 years ago

rostopira commented 7 years ago

After user grants always on location usage I see the following warning in XCode console. And looks like it's the cause of rare crashes in production.

2017-08-10 14:48:20.317102 MY_APP[902:377336] A location manager (0x15fec6c0) 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

ivanvorobei commented 6 years ago

Please, call in in Main thread. Its error show because you use not main thread