Accessing the APi

This is from the code in the video on Exploring Verifiable Health records. @ the 10:28 mark I get an error saying cannot find predicaetForVerifiableClincalRecords in Scope.

import HealthKit import Foundation

let healthStore = HKHealthStore()

let recordTypes = ["https://smarthealth.cards#immunization"]

let endDate = Date() let startDate = Calendar.current.date(byAdding: .day, value: -7, to: endDate) let dateInterval = DateInterval(start: startDate ?? .now, end: endDate) let predicate = predicateForVerifiableClinicalRecords(withRelevantDateWithin: dateInterval) <- error here

That last line needs to be:

let predicate = HKQuery.predicateForVerifiableClinicalRecords(withRelevantDateWithin: dateInterval)
Accessing the APi
 
 
Q