Book Image

Getting Started with ResearchKit

By : Dhanush Balachandran, Edward Cessna
Book Image

Getting Started with ResearchKit

By: Dhanush Balachandran, Edward Cessna

Overview of this book

ResearchKit is an open source software development framework from Apple that lets you easily create mobile applications for clinical research studies. ResearchKit provides you the ability to orchestrate the administration of tasks and recording of the results. ResearchKit provides tasks in order to perform informed consent, active tasks, and surveys. Starting with the basics of the ResearchKit framework, this books walks you through the steps of creating iOS applications that could serve as the basis of a clinical research mobile app. This book will introduce readers to ResearchKit and how to turn your iPhone into into a clinical research tool. The book will start off by installing and building the research framework in line with the researcher's needs; during this, the reader will learn to embed ResearchKit in the application and create a small task. After this, the book will go a little deeper into creating modules for surveys, consents, and so on. The book will also cover the various aspects of privacy and security with regard to participant data, and how to build dashboards for visualizing medical data and results in line with the researcher's requirements: data backends, JSON serialization and deserialization, and so on. Readers will be able to fully utilize ResearchKit for medical research, will be able to get more and more patients to participate in their surveys, and will gain insights from the surveys using the dashboards created.
Table of Contents (15 chapters)


This book helps you get started on creating ResearchKit-based applications. ResearchKitis an open source framework introduced by Apple that allows researchers and developers to create powerful apps for medical research.

What this book covers

Chapter 1, Getting Started, introduces ResearchKit and explains the anatomy of a ResearchKit-based application.

Chapter 2, ResearchKit Hello World, helps you create your first ResearchKit application and teaches how to integrate ResearchKit in your projects.

Chapter 3, Building Surveys, covers how to create and present clinical surveys. In this process, you'll also learn about the ResearchKit object model.

Chapter 4, ResearchKit Informed Consent, explains how to create, present, and obtain informed consent to participate in clinical studies from the end users.

Chapter 5, Active Tasks, covers how to use active tasks—one of the most important features of ResearchKit.

Chapter 6, Navigable and Custom Tasks, helps you create smart surveys that can skip questions based on the answers provided by users.

Chapter 7, Back End Service, explains how to serialize task results to send to a backend service.

Chapter 8, Where to go from here, helps you learn various tools and tips to create real-world ResearchKit applications.

What you need for this book

  • iOS Software development tools: Xcode 7.0 or higher

  • iOS Device (iPhone or iPad) to use sensors, GPS, and so on

  • Basic knowledge of iOS and Swift 2.0

Access to the Internet to download the source code associated with this book

Who this book is for

This book is aimed at medical researchers with basic iOS coding knowledge and iOS developers looking to create clinical research apps.


In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "In ViewController.swift file, import ResearchKit framework"

A block of code is set as follows:

let step1 = ORKInstructuionStep(identifier:"step1")
step1.title = "Hello World!"
let step2 = ORKInstructuionStep(identifier:"step2")
step2.title = "Bye!"

Any command-line input or output is written as follows:

git submodule add

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "clicking the Next button moves you to the next screen".


Warnings or important notes appear in a box like this.


Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you.


Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from


Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.


You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.