Why is my CLLocationmanager delegate not getting called?

前端 未结 5 1575
梦谈多话
梦谈多话 2020-12-13 07:34

I\'m not getting any location callbacks on either sim or device. I\'ve got this code being called:

- (void)startLocationCallbacks: (NSObject*) ignore
{
  loc         


        
5条回答
  •  时光说笑
    2020-12-13 07:39

    Actually you can run it from another thread as well. From Apple documentation:

    Configuration of your location manager object must always occur on a thread with an active run loop, such as your application’s main thread.

    Just make sure your run loop is running on that thread, and the CLLocationManager events are dispatched. More about run loop: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html

提交回复
热议问题