·core-motion
</>

core-motion

使用 CoreMotion 访问加速度计、陀螺仪、磁力计、计步器和活动识别数据。在读取设备传感器数据、计算步数、检测用户活动(步行/跑步/驾驶)、跟踪海拔变化或在 iOS/watchOS 应用程序中实现基于运动的交互时使用。

40安装·16热度·@dpearson2699

安装

$npx skills add https://github.com/dpearson2699/swift-ios-skills --skill core-motion

如何安装 core-motion

通过命令行快速安装 core-motion AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/dpearson2699/swift-ios-skills --skill core-motion
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:dpearson2699/swift-ios-skills。

SKILL.md

查看原文

Read device sensor data -- accelerometer, gyroscope, magnetometer, pedometer, and activity recognition -- on iOS and watchOS. CoreMotion fuses raw sensor inputs into processed device-motion data and provides pedometer/activity APIs for fitness and navigation use cases. Targets Swift 6.2 / iOS 26+.

Add NSMotionUsageDescription to Info.plist with a user-facing string explaining why your app needs motion data. Without this key, the app crashes on first access.

CoreMotion uses CMAuthorizationStatus for pedometer and activity APIs. Sensor APIs (accelerometer, gyro) do not require explicit authorization but do require the usage description key.

使用 CoreMotion 访问加速度计、陀螺仪、磁力计、计步器和活动识别数据。在读取设备传感器数据、计算步数、检测用户活动(步行/跑步/驾驶)、跟踪海拔变化或在 iOS/watchOS 应用程序中实现基于运动的交互时使用。 来源:dpearson2699/swift-ios-skills。

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill core-motion
分类
</>开发工具
认证
收录时间
2026-03-09
更新时间
2026-03-10

Browse more skills from dpearson2699/swift-ios-skills

快速解答

什么是 core-motion?

使用 CoreMotion 访问加速度计、陀螺仪、磁力计、计步器和活动识别数据。在读取设备传感器数据、计算步数、检测用户活动(步行/跑步/驾驶)、跟踪海拔变化或在 iOS/watchOS 应用程序中实现基于运动的交互时使用。 来源:dpearson2699/swift-ios-skills。

如何安装 core-motion?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/dpearson2699/swift-ios-skills --skill core-motion 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/dpearson2699/swift-ios-skills