Accessing Heart Rate Data for Your ResearchKit Study

In this tutorial, you’ll learn how to easily access heart rate data from HealthKit and use it in a ResearchKit study. By Matt Luedke.

Leave a rating/review
Save for later
You are currently viewing page 4 of 4 of this article. Click here to view the first page.

Where to Go From Here?

You can download the completed project for this tutorial here.

I encourage you to experiment with other properties of ORKActiveStep in this project to see easy it can be to customize a Step within ResearchKit. Check out the full list in the RestKit documentation here.

If you need a refresher on working with JSON in Swift, see Working with JSON in Swift. You’ll likely be doing quite a bit more of this in your ResearchKit apps.

For more information on ResearchKit, check the official site, GitHub repository, and official ResearchKit forum. Also, Apple maintains a ResearchKit blog and presented about ResearchKit at WWDC 2015.

Beyond the framework, you can look into useful extensions to ResearchKit in the form of CardioHealth, an app developed with Stanford to study cardiovascular disease, and AppCore, which is shared code among all the launch apps. I recommend you take a look at how tasks are created in those projects, and use that behavior as a model.

Thanks for reading; please comment below, and I hope to see more ResearchKit success stories!

Matt Luedke


Matt Luedke


Over 300 content creators. Join our team.