Skip to content

scottleibrand/Loop

 
 

Repository files navigation

Loop for iOS

App Icon WatchApp Icon

Build Status Join the chat at https://gitter.im/loudnate/LoopKit

Loop is an app template for building an artificial pancreas. It is a stone resting on the boulders of work done by @bewest, @ps2 and many others.

Please understand that this project:

  • Is highly experimental
  • Is not approved for therapy

Screenshot of status screen Screenshot of bolus screen Screenshot of battery change notification Screenshot of loop failure notification Screenshot of bolus failure notification

Screenshot of glucose complication on Apple Watch Screenshot of carb entry on Apple Watch Screenshot of bolus entry on Apple Watch Screenshot of bolus failure notification on Apple Watch Screenshot of bolus failure notification on Apple Watch Screenshot of bolus failure notification on Apple Watch

Hardware

Insulin Pump
MM 522/722 MM 523/723
CGM Dexcom G4 + Share 1 2 3 2
Dexcom G5 3

1. Follow #10 for updates
2. Internet connection required to retrieve glucose
3. Pump must have a remote ID added in the Remote Options menu

LoopKit

Loop is built on top of LoopKit. LoopKit is a set of frameworks that provide data storage, retrieval, and calcluation, as well as boilerplate view controllers used in Loop.

Getting Started

Fork and clone this repository so you can commit the changes you'll make below.

Assigning a Bundle Identifier

Assigning a bundle identifier

In the Loop project's Build Settings, change the value of MAIN_APP_BUNDLE_IDENTIFIER to something unique. Usually this means replacing com.loudnate with a reverse-domain name of your choosing.

Configuring RemoteSettings.plist

Loop optionally supports select third-party remote services. While none of them are required to run the app, including mLab keys is strongly recommended at this time so loop diagnostic data can be stored in case retrospective analysis is needed.

After a fresh clone of the repository, you'll need duplicate the template file and populate the copy with values.

$ cp Loop/RemoteSettings-template.plist Loop/RemoteSettings.plist

RemoteSettings.plist is included in .gitignore so you won't accidentally commit any sensitive keys.

Key Description
mLabAPIKey Your mLab API Key (for tracking errors and diagnostic info)
mLabAPIHost The mLab API host
mLabAPIPath Your mLab database path
AmplitudeAPIKey Your Amplitude analytics API Key (for optional, private behavior tracking)
ShareAccountName Your username for Dexcom share (for backfilling glucose data)
ShareAccountPassword Your password for Dexcom share

Setting up Carthage

Carthage is used to manage dependencies. If you haven't installed Carthage on your Mac before, follow the installation instructions.

After a fresh clone of the repository, you'll need to do a checkout and build of the dependencies:

$ carthage bootstrap

After pulling new changes, you'll need to run the same command again.

Making it Your Own

You might open this app a lot. Make it the most personal app on your iPhone by changing the name and icon.

Renaming the Target

Changing the target name

In the Targets list, rename "Loop" to anything you like. This has the side-effect of changing the display name of the app as well, though you can choose to decouple those if you like later by reading more about Xcode target configuration.

Changing the Icon

Changing the app icon

  1. Select the application asset library from the Project Navigator
  2. Select the image set named AppIcon
  3. Replace each image size with your own icon

Changing the code

TODO: Write more documentation!

License and Code of Conduct

Please read the LICENSE and CODE_OF_CONDUCT

About

A closed-loop insulin delivery app for iOS

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%