location manager was created on a dispatch queue

后端 未结 3 771
余生分开走
余生分开走 2021-01-02 05:45

what does this message mean?

NOTICE,A location manager (0xe86bdf0) was created on a dispatch queue executing on a thread other than the main thread. It is the devel

3条回答
  •  伪装坚强ぢ
    2021-01-02 06:26

    You must create the CLLocationManager on a thread with an active run loop, such as the main thread. You should not create it on a background thread. See CLLocationManager Class Reference for more information:

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

    If you're interested in what exactly a run loop is, see Run Loops for further information.

提交回复
热议问题