ORKDataCollectionManagerDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | ORKDataCollectionManager.h |
The data collection manager delegate is responsible for delivering collected data objects, and reporting errors during the operation.
– healthCollector:didCollectSamples:
Method for delivering the collected health data samples.
- (BOOL)healthCollector:(ORKHealthCollector *)collector didCollectSamples:(NSArray<HKSample*> *)samples
Parameters
collector |
The data collector. |
---|---|
samples |
Collected health data samples. |
Return Value
Boolean indicating whether the samples has be accepted. If NO is returned or this method is not implemented, the manager will stop the collection for the collector and repeat this same collection next time, until the data is accepted.
Declared In
ORKDataCollectionManager.h
– healthCorrelationCollector:didCollectCorrelations:
Method for delivering the collected health correlations.
- (BOOL)healthCorrelationCollector:(ORKHealthCorrelationCollector *)collector didCollectCorrelations:(NSArray<HKCorrelation*> *)correlations
Parameters
collector |
The data collector. |
---|---|
correlations |
Collected health correlation samples. |
Return Value
Boolean indicating whether the samples has be accepted. If NO is returned or this method is not implemented, the manager will stop the collection for the collector and repeat this same collection next time, until the data is accepted.
Declared In
ORKDataCollectionManager.h
– motionActivityCollector:didCollectMotionActivities:
Method for delivering the collected motion activities.
- (BOOL)motionActivityCollector:(ORKMotionActivityCollector *)collector didCollectMotionActivities:(NSArray<CMMotionActivity*> *)motionActivities
Parameters
collector |
The data collector. |
---|---|
motionActivities |
Collected motion activities. |
Return Value
Boolean indicating whether the samples has be accepted. If NO is returned or this method is not implemented, the manager will stop the collection for the collector and repeat this same collection next time, until the data is accepted.
Declared In
ORKDataCollectionManager.h
– dataCollectionManagerDidCompleteCollection:
Indicating the collection is completed for all the collectors.
- (void)dataCollectionManagerDidCompleteCollection:(ORKDataCollectionManager *)manager
Parameters
manager |
The data collection manager. |
---|
Declared In
ORKDataCollectionManager.h
– collector:didDetectError:
Method for reporting the deteted error during collection.
- (void)collector:(ORKCollector *)collector didDetectError:(NSError *)error
Parameters
collector |
The data collector. |
---|---|
error |
The error object. |
Declared In
ORKDataCollectionManager.h