Contents

init(predicate:limit:resultsHandler:)

Declaration

init(predicate: NSPredicate?, limit: Int, resultsHandler: @escaping (HKUserAnnotatedMedicationQuery, HKUserAnnotatedMedication?, Bool, (any Error)?) -> Void)

Parameters

  • predicate:

    The predicate which user annotated medications should match.

  • limit:

    The maximum number of user annotated medications to return. Pass HKObjectQueryNoLimit for no limit.

  • resultsHandler:

    The block to invoke with results to deliver to the client. The results handler will be called with done = YES when there are no more user annotated medications to enumerate.

Discussion

Returns a query that will retrieve HKUserAnnotatedMedications matching the given predicate and limit.