Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这里有一个已编译的命令行应用程序可以执行此操作。
是否有 Cocoa API 来查询这些数据?
没有用于运动传感器的 Cocoa API。它只能通过调用 IOKit 获得。它在Mac OS X Internals中有描述。
您可以尝试SMSLib,这是一个用于访问突然运动传感器的开源 Objective-C 库。