Using Xcode 9.4, Swift 3 and CareKit framework 1.2.1 Error Message:
Ambiguous reference to member OCKCarePlanActivity 'assessment (withIdentifier:groupIdentifier:title:text:tintColor:resultResettable:schedule:userInfo:thresholds:optional:)'
Here is the code.
let pulseActivity = OCKCarePlanActivity
.assessment(withIdentifier: ActivityIdentifier.pulse.rawValue,
groupIdentifier: nil,
title: "Pulse",
text: "Do you have one?",
tintColor: UIColor.darkGreen(),
resultResettable: true,
schedule: CarePlanData.dailyScheduleRepeating(occurencesPerDay: 1),
userInfo: ["ORKTask": AssessmentTaskFactory.makePulseAssessmentTask()]
)
Newer CareKit framework added Optional parameter.
This change fixed my error. Hope it will help others.