Core Motion in MacOS

Hi all, does anyone know if the Mac's, specifically a Mac Air, have the hardware acceleromater and gyros to really support the Core Motion APIs in MacOS?


I've got a working iOS app that uses the accelerometer and gyro readings, but I've been asked to port it to a Mac Air.


Thanks in advance for your help!


A

Answered by DTS Engineer in 407282022

Regardless of whether they have the hardware, Macs don’t support CoreMotion. The framework is present in the macOS SDK for the benefit of Mac Catalyst but much of the API is marked as unavailable and those bits that you can call won’t return useful info.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Accepted Answer

Regardless of whether they have the hardware, Macs don’t support CoreMotion. The framework is present in the macOS SDK for the benefit of Mac Catalyst but much of the API is marked as unavailable and those bits that you can call won’t return useful info.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks Eskimo, that's saved me wasting a lot of time and effort!


A

Is this still true for CMHeadphoneMotionManager? This would be relevant to be able to get airpods pro orientation directly to MacOS, not only iOS.
At least, are you aware of such possibility?
Thanks!
Core Motion in MacOS
 
 
Q