diff --git a/core/droidkaigiui/src/iosMain/kotlin/io/github/droidkaigi/confsched/droidkaigiui/OrientationSensorManager.ios.kt b/core/droidkaigiui/src/iosMain/kotlin/io/github/droidkaigi/confsched/droidkaigiui/OrientationSensorManager.ios.kt index 3e81b37db..55614fdbc 100644 --- a/core/droidkaigiui/src/iosMain/kotlin/io/github/droidkaigi/confsched/droidkaigiui/OrientationSensorManager.ios.kt +++ b/core/droidkaigiui/src/iosMain/kotlin/io/github/droidkaigi/confsched/droidkaigiui/OrientationSensorManager.ios.kt @@ -22,12 +22,12 @@ internal class IosOrientationSensorManager( private val motionManager = CMMotionManager() override fun start() { - if (!motionManager.deviceMotionActive) { + if (!motionManager.deviceMotionAvailable) { return } - NSOperationQueue.currentQueue()?.let { + NSOperationQueue.mainQueue().let { queue -> motionManager.startDeviceMotionUpdatesToQueue( - it, + queue, ) { motion, _ -> if (motion == null) { return@startDeviceMotionUpdatesToQueue