mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
410 B
13 lines
410 B
#import "pedometerHelper.h"
|
|
#import <CoreMotion/CoreMotion.h>
|
|
#import <CoreMotion/CMPedometer.h>
|
|
#import <Foundation/Foundation.h>
|
|
|
|
// TODO(https://github.com/dart-lang/native/issues/835): Generate this wrapper
|
|
// automatically.
|
|
CMPedometerHandler wrapCallback(CMPedometerHandler callback) {
|
|
return [^(CMPedometerData *data, NSError *error) {
|
|
return callback([data retain], [error retain]);
|
|
} copy];
|
|
}
|