ResearchKit a powerful open source framework

If you want to develop medical apps for ios, this is a framework that you might know.
In April 2015, Apple enacted its vision to advance medical research by sharing ResearchKit, an open source software framework that makes it easy for app developers and researchers to create research apps. This new framework takes advantage of sensors and capabilities of iPhone to track movement, take measurements, and record data. Users can perform activities and generate data from anywhere.

The ResearchKit framework provides three customizable modules that address some of the most common elements of research: surveys, consent, and active tasks. You can use these modules as they are, build on them, and even create completely new modules of your own. That modules are:

  • Surveys: The survey module’s predefined user interface lets you quickly build surveys simply by specifying the questions and types of answers. The survey module is already localized, so all you need to do is localize your questions.

  • Consent: Participants in research studies are often asked to share sensitive information as part of their enrollment and involvement in the study. That’s why it’s critical to clarify exactly what information will be collected from users and who will have access to their information. The ResearchKit framework provides templates that you can customize to explain the details of your study and to obtain the participant’s consent.

  • Active Tasks: Some studies may need more data than is provided by responses to survey questions or the data collection capabilities of the HealthKit and CoreMotion APIs on iOS. Active tasks invite users to perform activities under partially controlled conditions using iPhone sensors to actively collect data.

How to setup?

This step-by-step guide will help you setup your first ResearchKit project. Note that this post is not about building the app itself.

Install XCode

The integrated development environment (IDE) from Apple that is used to create, compile and test Mac OS X and iOS (iPhone/iPad/iPod) applications.

It’s only available for OS X, so you will need a Mac computer to build your ResearchKit app. You won’t necessarily need an iPhone to test your project, though, because Xcode provides an iPhone Simulator that runs directly on your computer.

Create Project

Instead of starting from a blank page, Xcode offers different project templates, based on the type of app you want to make.
There’s no ResearchKit template, but we can just select a generic template, then import ResearchKit later.

To create a new project, open Xcode, then click on “File” → “New” → “Project…”. A window will appear to let you choose one of the existing templates.

By default, the name for the project also becomes the name for your app. But don’t worry, you can rename your app later.

Important “The project name is more permanent, because Xcode will use it to create folders and configuration files. It is possible to change that later, but it becomes more complicated because of all the moving parts involved”

Download ResearchKit Library

ResearchKit is a project run by Apple, but it’s not included in the iOS system libraries, so you need to download it separately. The project is hosted on GitHub.

GitHub: “GitHub is a development platform inspired by the way you work. From open source to business, you can host and review code, manage projects, and build software alongside millions of other developers.”

Get it on GitHub: https://github.com/researchkit/researchkit

Configure Researchkit

The next step is to configure our app project to include ResearchKit as a “framework”.
First, we need to drag-and-drop the ResearchKit project into our main app project. That means that we are going to have a project inside another project.

Take the “ResearchKit.xcodeproj” item from the “ResearchKit” folder, and drop it into the project “Navigator” area (the column on the left).

Now click on your project from the Navigator to display the project settings. At the bottom of the “General” tab, you will find a “Embedded Binaries” section. Click on the “+” button, and select “ResearchKit.framework”.

That’s all we need to include ResearchKit in our project. If you have any doubt, please contact us for more.

Source: