ResearchKit object model
This section provides a high-level overview of ResearchKit object model using UML-like class diagrams. Understanding the object model will help us utilize the ResearchKit better.
Tasks and steps
Tasks and steps are the fundamental building blocks of ResearchKit. Just like the tasks in real world, the tasks in ResearchKit can be defined with a series of steps. The examples of these tasks can be answering to a five-question survey, a 20 minute cardio activity test, and so on:
The preceding image shows the object model for tasks and steps. Note that, for the sake of simplicity, the diagram only shows the important properties and methods. Feel free to refer to the ResearchKit API documentation in Xcode for a comprehensive list of properties and methods.
The <ORKTask>
is a protocol that defines a generic ResearchKit task. It has a non-nil identifier
property to identify the task and two methods: stepBeforeStep
and stepAfterStep
. The ORKOrderedTask
implements these...