Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CoreMotion apparently calls UI API from background thread

At some point in my app I am initializing a CMMotionManager. This happens on the main thread. After doing so, the Xcode 10 main thread checker indicates that

-[UIApplication applicationState] 

is not being called from the main thread. Indeed it is coming from

Thread name: com.apple.CoreMotion.MotionThread

Since this is Apple's private framework it appears to me that I just have to wait until this issue is fixed on Apple's side. Am I correct and/or is there any way to remedy this issue without switching off the main thread checker?

like image 428
ff10 Avatar asked Nov 20 '18 17:11

ff10


1 Answers

Its currently a bug in the API, something is triggering in background thread.

i could stop it with

lazy var motionManager = CMMotionManager()

see also https://github.com/JonasGessner/JGProgressHUD/issues/98, but there is no solution right now.

like image 162
Skyborg Avatar answered Sep 29 '22 15:09

Skyborg