Documentation Archive Developer
Search

CoreMotion Changes for Swift

CoreMotion

Removed CMSensorRecorder.accelerometerDataFrom(_: NSDate, to: NSDate) -> CMSensorDataList?
Removed CMSensorRecorder.recordAccelerometerFor(_: NSTimeInterval)
Declaration
From
class CMSensorRecorder : NSObject {
    class func isAccelerometerRecordingAvailable() -> Bool
    class func isAuthorizedForRecording() -> Bool
    func accelerometerDataSince(_ identifier: UInt64) -> CMSensorDataList?
    func accelerometerDataFrom(_ fromDate: NSDate, to toDate: NSDate) -> CMSensorDataList?
    func recordAccelerometerFor(_ duration: NSTimeInterval)
}
To
class CMSensorRecorder : NSObject {
    class func isAccelerometerRecordingAvailable() -> Bool
    class func isAuthorizedForRecording() -> Bool
    func accelerometerDataFromDate(_ fromDate: NSDate, toDate toDate: NSDate) -> CMSensorDataList?
    func recordAccelerometerForDuration(_ duration: NSTimeInterval)
}