The TheraForge OTFCareKit is a framework for creating digital health applications that help people to better understand and manage their health. The framework provides modules that can be used out of the box, or extended and customized for more targeted use cases.
Release 2.0.2-beta.4
- Added WatchOS target
Release 2.0.2-beta.3
- Added `OTFAttachment` struct that represents an attachment e.g. user's profile picture and consent form
- Added computed properties attachments and appSettings to conveniently get all the attachments and settings from OCKPatient's userInfo object
- Added WatchOS support
Please refer to the top-level parent framework: OTFToolBox
Read more details regarding CareKit here.
An Intel-based Mac running macOS Catalina 10.15.4 or later or a Mac with Apple's M1 Silicon running macOS 11 Big Sur.
Install the following components:
-
Xcode 12 or later (SDK 14)
-
CocoaPods 1.10.0 or later
For your projects make sure to target iOS 13 or later.
If you don't have Xcode, then follow this Xcode article to install and configure Xcode.
After successfully installing Xcode and creating a new project, you can build your first digital health application.
The next step is to integrate OTFCareKit with your application. OTFCareKit can be installed via CocoaPods.
If you are new to CocoaPods you can refer to the CocoaPods Guides to learn more about it.
CocoaPods is built with the Ruby language and can be installed with the default version of Ruby available with macOS.
Open the Terminal application (you can search for “Terminal” in Spotlight and press Return).
Then type the following command in Terminal:
sudo gem install cocoapods
Then you need to create a project directory in your user directory.
For example, in Terminal go to your personal directory by typing this command:
cd ~
Then create a Development directory (if you haven’t done it already) to create a project directory in it:
mkdir Development
For example, you may want to call your project MyDigitalHealthApp and so you would typically also create a directory with the same name in your Development directory:
cd Development
mkdir MyDigitalHealthApp
cd MyDigitalHealthApp
In your project directory, if you don’t already have a pod file (which is required by CocoaPods to install frameworks), create one with the command:
pod init
This will add a default pod file in your project directory. Once your project podfile is ready, you can start adding required podspecs under target in this file.
Next step is to integrate OTFCareKit with your application. OTFCareKit can be installed via Cocoapods.
Integrating OTFCareKit with an existing workspace requires the below extra lines in your Podfile.
source 'https://github.com/TheraForge/OTFCocoapodSpecs'
pod 'OTFCareKit'
Run pod install from the terminal root of your project directory, which will fetch all the external dependencies mentioned by you, and associate it with a .xcworkspace file of your project. This .xcworkspace file will be generated for you if you already do not have one.
$ pod install
Once you successfully install podspec, you can start importing OTFCareKit, OTFCareKitUI and OTFCareKitStore.
Theraforge's OTFCareKit framework includes the following build targets to be more selective at compile time:
-
CARE : OTFCareKit code module will be compiled.
-
HEALTH : HealthKit code module will be compiled.
This project is made available under the terms of a modified BSD license. See the LICENSE file.