Learn how easy it is to build a personal health app with CareKit!
In a zombie apocalypse (or any other time, really) there’s nothing as important as health. Thankfully we have CareKit, an open source framework designed for building iOS apps that help users manage and understand their personal health. CareKit apps help users create and follow health plans, track progress, analyze the resulting data and even share that data with care providers.
Thanks to Apple’s continued interest in improving personal health with open source software, along with the health tracking capabilities of the iPhone and Apple Watch, it’s never been easier to put together an app that can have a powerful impact on the lives of many people!
In this CareKit tutorial, you’ll leverage CareKit in an app aimed at users trying to stay infection-free during a zombie apocalypse. You’ll create a care plan consisting of treatments to minimize risk and assessments to track signs of infection. You’ll also learn how integrating ResearchKit and HealthKit can make CareKit much more powerful.
If you’re unfamiliar with ResearchKit tasks, you may benefit from reviewing ourResearchKit tutorial before starting.
In Part 1 of the CareKit tutorial you’ll work on Zombie Training and Symptom Tracker; Part 2 will cover Insights and Connect.
Grab some … err … your brains, and let’s dive in!
Download the ZombieKit starter project and open it in Xcode. This contains a stubbed-out Tab Bar Controller, ResearchKit and HealthKit, plus a few helpers you’ll learn about during this CareKit tutorial.
Build and run ZombieKit to see the placeholder Tab Bar Controller in all its glory.
Note : The ResearchKit build in this starter is a pre-release version with Swift 3 support. As a result, you’ll see a few compile warnings on the ResearchKit target. Don’t worry about them—they won’t impact your work in this tutorial.
First, add the CareKit framework to your project. Head over to the CareKit repository on GitHub and download the stable_xcode80_candidate zip or clone that branch using the following terminal command:
[code]git clone -b stable_xcode80_candidate --recurse-submodules https://github.com/carekit-apple/carekit.git[/code] Note : As of this writing, stable_xcode80_candidate is your best bet for CareKit with Swift 3 and Xcode 8 compatibility. You’ll want to use stable , once Swift 3 changes make it there.
Drag the downloaded CareKit.xcodeproj from Finder into the Project Navigator under the Linked Frameworks group. It should look like this: