ios7 - 哪些 iOS 设备支持 CMStepCounter?

标签 ios7 core-motion apple-m7

Apple 在新款 iPhone 5s 中通过 M7 添加了步数支持。这是关于 isStepCountingAvailable 的文档

isStepCountingAvailable Returns a Boolean indicating whether step-counting support is available on the current device.

  • (BOOL)isStepCountingAvailable Return Value YES if step-counting support is available or NO if it is not.

Discussion Step-counting support is not available on all iOS devices. Use this method to determine if support is available on the current device.

Availability Available in iOS 7.0 and later. Declared In CMStepCounter#

当我运行时:

BOOL isUsersHardwareCompatibleWithPedometerApp = [CMStepCounter isStepCountingAvailable];

在我的 5s 上,isUsersHardwareCompatibleWithPedometerApp 的值为 YES

哪些设备将为 Core Motion 的 CMStepCounter 类方法 + isStepCountingAvailable 返回 YES?另外,我是否可以限制返回 NO 的设备在 AppStore 中下载我的应用程序?或者是否有一个好的代理来限制用户下载我的应用程序,例如前置摄像头是一个好的代理来确定用户是否拥有至少 512mb 的 RAM?

最佳答案

我没有可以测试的设备,但受欢迎的 Pedometer++ 应用程序的创建者 @_DavidSmith 已确定新的 iPad Air/rMini 不提供步数数据。

After some investigation the iPad Air/rMini look to support activity categorization but not step counting w/ its M7. Which makes sense to me

https://twitter.com/_DavidSmith/status/404252937821900801

因此,迄今为止,iPhone 5s 是唯一支持步数数据的设备。

关于ios7 - 哪些 iOS 设备支持 CMStepCounter?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20166556/

相关文章:

ios - 如何知道用户何时在 iOS 7 上禁用推送通知?

ios - 无法在 iOS 7 上加载最高排行榜分数

ios - CMPedometer queryPedometerDataFromDate 返回错误 103

ios - 如何使用 CoreMotion 获取空间中的设备方向

objective-c - 无法运行 performSelector : afterDelay from CoreMotion Block

ios - iOS 模拟器的 “Motion Control” 菜单项有什么作用?

ios - iOS 应用程序中的 Helvetica Neue 字体

ios - 更改 UIToolbar 的颜色

ios - 如何在总步骤中获取CMMotionActivity

ios - Apple 的 M7 处理器是否支持低功耗 GPS 跟踪?