简体   繁体   English

如何在应用程序中检测M7协处理器传感器

[英]How to detect M7 co-processor sensoring in an application

I just wanted to make clear. 我只是想说清楚。 I am using accelerometer in my app, So do we need to add any other framework or method to receive iPhone5s's M7 co-processor data? 我在我的应用程序中使用了加速度计,那么我们是否需要添加任何其他框架或方法来接收iPhone5s的M7协处理器数据? Is that enough of using CoreMotion framework with Method CoreMotion框架与Method一起使用足够了

-(void)startAccelerometerUpdatesToQueue:(NSOperationQueue *)queue withHandler:(CMAccelerometerHandler)handler;

to receive data from M7 co-processor?Or am I need to include any extra method or framework to get data in iPhone 5s? 从M7协处理器接收数据?还是我需要包括任何其他方法或框架才能在iPhone 5s中获取数据?

Thanks in Advance. 提前致谢。

As said here : 这里所说:

The Apple M7 and M8 co-processors collect, process, and store sensor data even if the device is asleep, and applications can retrieve data when the device is powered up again. 即使设备处于睡眠状态,Apple M7和M8协处理器也可以收集,处理和存储传感器数据,并且当设备再次通电时,应用程序可以检索数据。 This reduces power draw of the device and saves battery life. 这样可以减少设备的功耗并节省电池寿命。

So you don't need to add any other framework. 因此,您无需添加任何其他框架。

You can detect the M7 equipped device using [CMMotionActivityManager isActivityAvailable] - check the official documentation . 您可以使用[CMMotionActivityManager isActivityAvailable]检测配备M7的设备-查看官方文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM