问题标签 [apple-m7]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1618 浏览

iphone - CMMotionActivityManager isActivityAvailable 设备

我想使用CMMotionActivityManager,我想知道哪些设备运动数据可用?我读过的许多地方都表明它目前仅在具有 M7 芯片的设备上。

https://developer.apple.com/library/ios/documentation/CoreMotion/Reference/CMMotionActivityManager_class/Reference/Reference.html#//apple_ref/occ/cl/CMMotionActivityManager

0 投票
2 回答
1372 浏览

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

据称,Apple 的新 M7 协处理器可通过持续监测运动而不会耗尽电池,从而支持新一代的健康和健身应用程序。

在 iPhone 5S 公告中,Apple 列出了对这些传感器的支持:

  • 加速度计
  • 陀螺仪
  • 罗盘

它没有提到GPS硬件,但是因为它对我来说很有意义,所以我想知道M7处理器是否也可以用于低功耗地理位置跟踪?

0 投票
1 回答
1174 浏览

ios - CoreMotion API 和运动权限

在 iPhone 5S 上使用 M7 运动协处理器的数据时,我看到一些类让用户授予应用程序权限,(有点像他们为 GPS 使用或照片库所做的)

有谁知道哪些核心运动类需要用户允许运动访问,因为我想避免这种情况,

0 投票
5 回答
17743 浏览

ios - CoreMotion updates in background state

With the M7 chip in the latest iOS devices one can get programmatically notified as the user goes from stationary to running, walking, etc using CMMotionActivityManager. Stava and Runkeeper have both used this to auto-pause GPS polling (shut off the GPS antenna) when it detects the user isn't moving via the M7, and then re-enable GPS updates once they are moving again. It is able to do this while the app is in the background state, which is the key here.

The issue I run into while duplicating this functionality is that if I turn off GPS updates while my app is in the background I stop receiving activity updates, and can no longer detect when the user moves again via the M7 to turn the GPS back on.

If I leave the GPS running the whole time I'll continue to get movement updates from Core Motion the entire time the app is in the background.

I'm assuming they aren't playing white-noise or some other cheap trick to stay active. How did they go about this?

0 投票
2 回答
3393 浏览

ios7 - 哪些 iOS 设备支持 CMStepCounter?

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

isStepCountingAvailable 返回一个布尔值,指示当前设备是否支持计步。

  • (BOOL)isStepCountingAvailable 返回值 如果步数支持可用,则返回 YES,否则返回 NO。

讨论 计步支持并非在所有 iOS 设备上都可用。使用此方法可确定当前设备上是否提供支持。

可用性 适用于 iOS 7.0 及更高版本。在 CMStepCounter 中声明#

当我运行时:

BOOL isUsersHardwareCompatibleWithPedometerApp = [CMStepCounter isStepCountingAvailable];

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

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

0 投票
1 回答
357 浏览

ios - iOS7 - CMStepCounter 类问题

有谁知道是否可以在CMStepUpdateHandler不等待引用的步数的情况下调用该块?我想要这个的原因是,如果用户启动startStepCountingUpdatesToQueue:updateOn:withHandler:并暂停应用程序,仅在他们完成步行后重新打开,步数将不会更新,因为有必要然后在应用程序中步行引用的步数显示步骤之前的前景。非常感谢任何帮助。PS,请参阅此处获取文档... https://developer.apple.com/LIBRARY/IOS/documentation/CoreMotion/Reference/CMStepCounter_class/Reference/Reference.html

0 投票
1 回答
516 浏览

ios - 在iOS中检测步行或跑步与汽车或飞机运动的好方法是什么?

在较新的设备中使用 M7 是获得准确运动读数的唯一方法吗?

在较旧的设备中,是否有任何方法可以跟踪用户是在步行还是在跑步?我不关心行进的距离或方向,只关心他们是否随着时间的推移而行走或奔跑。

谢谢!

0 投票
1 回答
978 浏览

ios - 在 ios 中以暂停状态工作的运动活动

我在我的一个应用程序中使用 M7 处理器运动活动。当应用程序处于挂起状态时,我也想获得运动活动更新。我不想调用 startUpdatingLocation 来防止应用程序进入挂起状态,因为它会消耗大量电池。当应用程序进入后台时,我已经设置了区域监控,但我仍然没有收到动态更新。

除了调用 startUpdatingLocation 以在暂停状态下获取运动活动更新之外,还有其他方法吗?

0 投票
1 回答
4243 浏览

ios - 如何实现 CMStepCounter CoreMotion - M7 芯片

我想知道是否有人可以向我展示如何实现 CMStepCounter 的示例。(我已经查看了文档,但对于如何实现仍然有些困惑)。

每次采取步骤时,我都希望在我的视图上更新 UILabel。我还希望让应用程序在关闭时继续计算步数。

我对 iOS 比较陌生,任何帮助将不胜感激 :) !

谢谢,瑞安

0 投票
2 回答
948 浏览

ios - iOS 模拟器的“运动控制”菜单项有什么作用?

在 Xcode 5 附带的 iOS 模拟器中,有一个菜单项Window → Motion Control。点击它似乎没有效果。有谁知道它的作用?它是否与最近 iOS 设备上的 M7 协处理器或“开关控制”辅助功能有关?