├── NightscoutWatch WatchKit Extension ├── Images.xcassets │ ├── README__ignoredByTemplate__ │ ├── arrow_over_red.imageset │ │ ├── arrow_over_red.png │ │ └── Contents.json │ ├── arrow_diagUp_red.imageset │ │ ├── arrow_diagUp_red.png │ │ └── Contents.json │ ├── arrow_over_gray.imageset │ │ ├── arrow_over_gray.png │ │ └── Contents.json │ ├── arrow_over_green.imageset │ │ ├── arrow_over_green.png │ │ └── Contents.json │ ├── arrow_diagUp_gray.imageset │ │ ├── arrow_diagUp_gray.png │ │ └── Contents.json │ ├── arrow_over_yellow.imageset │ │ ├── arrow_over_yellow.png │ │ └── Contents.json │ ├── arrow_diagDown_red.imageset │ │ ├── arrow_diagDown_red.png │ │ └── Contents.json │ ├── arrow_diagUp_green.imageset │ │ ├── arrow_diagUp_green.png │ │ └── Contents.json │ ├── arrow_doubleUp_red.imageset │ │ ├── arrow_doubleUp_red.png │ │ └── Contents.json │ ├── arrow_singleUp_red.imageset │ │ ├── arrow_singleUp_red.png │ │ └── Contents.json │ ├── arrow_diagDown_gray.imageset │ │ ├── arrow_diagDown_gray.png │ │ └── Contents.json │ ├── arrow_diagUp_yellow.imageset │ │ ├── arrow_diagUp_yellow.png │ │ └── Contents.json │ ├── arrow_doubleUp_gray.imageset │ │ ├── arrow_doubleUp_gray.png │ │ └── Contents.json │ ├── arrow_singleUp_gray.imageset │ │ ├── arrow_singleUp_gray.png │ │ └── Contents.json │ ├── arrow_diagDown_green.imageset │ │ ├── arrow_diagDown_green.png │ │ └── Contents.json │ ├── arrow_diagDown_yellow.imageset │ │ ├── arrow_diagDown_yellow.png │ │ └── Contents.json │ ├── arrow_doubleDown_gray.imageset │ │ ├── arrow_doubleDown_gray.png │ │ └── Contents.json │ ├── arrow_doubleDown_red.imageset │ │ ├── arrow_doubleDown_red.png │ │ └── Contents.json │ ├── arrow_doubleUp_green.imageset │ │ ├── arrow_doubleUp_green.png │ │ └── Contents.json │ ├── arrow_doubleUp_yellow.imageset │ │ ├── arrow_doubleUp_yellow.png │ │ └── Contents.json │ ├── arrow_singleDown_gray.imageset │ │ ├── arrow_singleDown_gray.png │ │ └── Contents.json │ ├── arrow_singleDown_red.imageset │ │ ├── arrow_singleDown_red.png │ │ └── Contents.json │ ├── arrow_singleUp_green.imageset │ │ ├── arrow_singleUp_green.png │ │ └── Contents.json │ ├── arrow_singleUp_yellow.imageset │ │ ├── arrow_singleUp_green.png │ │ └── Contents.json │ ├── arrow_doubleDown_green.imageset │ │ ├── arrow_doubleDown_green.png │ │ └── Contents.json │ ├── arrow_singleDown_green.imageset │ │ ├── arrow_singleDown_green.png │ │ └── Contents.json │ ├── arrow_doubleDown_yellow.imageset │ │ ├── arrow_doubleDown_yellow.png │ │ └── Contents.json │ └── arrow_singleDown_yellow.imageset │ │ ├── arrow_singleDown_yellow.png │ │ └── Contents.json ├── BGHistoryTableRow.m ├── NightscoutWatch WatchKit Extension.entitlements ├── BGHistoryTableRow.h ├── GlanceController.h ├── InterfaceController.h ├── Info.plist ├── InterfaceController.m └── GlanceController.m ├── NightscoutWatch WatchKit App ├── NS_raw_20.png ├── NS_raw_21.png ├── line@2x.png ├── arrow_over_red.png ├── arrow_diagUp_red.png ├── arrow_over_gray.png ├── arrow_over_green.png ├── arrow_diagDown_gray.png ├── arrow_diagDown_red.png ├── arrow_diagUp_gray.png ├── arrow_diagUp_green.png ├── arrow_diagUp_yellow.png ├── arrow_doubleUp_gray.png ├── arrow_doubleUp_red.png ├── arrow_over_yellow.png ├── arrow_singleUp_gray.png ├── arrow_singleUp_red.png ├── arrow_diagDown_green.png ├── arrow_diagDown_yellow.png ├── arrow_doubleDown_gray.png ├── arrow_doubleDown_red.png ├── arrow_doubleUp_green.png ├── arrow_doubleUp_yellow.png ├── arrow_singleDown_gray.png ├── arrow_singleDown_red.png ├── arrow_singleUp_green.png ├── arrow_singleUp_yellow.png ├── arrow_doubleDown_green.png ├── arrow_doubleDown_yellow.png ├── arrow_singleDown_green.png ├── arrow_singleDown_yellow.png ├── Images.xcassets │ ├── line.imageset │ │ ├── line@2x-1.png │ │ ├── line@2x.png │ │ └── Contents.json │ ├── arrow_over_red.imageset │ │ ├── arrow_over_red.png │ │ └── Contents.json │ ├── arrow_over_gray.imageset │ │ ├── arrow_over_gray.png │ │ └── Contents.json │ ├── arrow_diagUp_red.imageset │ │ ├── arrow_diagUp_red.png │ │ └── Contents.json │ ├── arrow_over_green.imageset │ │ ├── arrow_over_green.png │ │ └── Contents.json │ ├── arrow_diagUp_gray.imageset │ │ ├── arrow_diagUp_gray.png │ │ └── Contents.json │ ├── arrow_over_yellow.imageset │ │ ├── arrow_over_yellow.png │ │ └── Contents.json │ ├── arrow_diagDown_gray.imageset │ │ ├── arrow_diagDown_gray.png │ │ └── Contents.json │ ├── arrow_diagDown_red.imageset │ │ ├── arrow_diagDown_red.png │ │ └── Contents.json │ ├── arrow_diagUp_green.imageset │ │ ├── arrow_diagUp_green.png │ │ └── Contents.json │ ├── arrow_diagUp_yellow.imageset │ │ ├── arrow_diagUp_yellow.png │ │ └── Contents.json │ ├── arrow_doubleUp_gray.imageset │ │ ├── arrow_doubleUp_gray.png │ │ └── Contents.json │ ├── arrow_doubleUp_red.imageset │ │ ├── arrow_doubleUp_red.png │ │ └── Contents.json │ ├── arrow_singleUp_gray.imageset │ │ ├── arrow_singleUp_gray.png │ │ └── Contents.json │ ├── arrow_singleUp_red.imageset │ │ ├── arrow_singleUp_red.png │ │ └── Contents.json │ ├── arrow_diagDown_green.imageset │ │ ├── arrow_diagDown_green.png │ │ └── Contents.json │ ├── arrow_doubleDown_red.imageset │ │ ├── arrow_doubleDown_red.png │ │ └── Contents.json │ ├── arrow_doubleUp_green.imageset │ │ ├── arrow_doubleUp_green.png │ │ └── Contents.json │ ├── arrow_singleDown_red.imageset │ │ ├── arrow_singleDown_red.png │ │ └── Contents.json │ ├── arrow_singleUp_green.imageset │ │ ├── arrow_singleUp_green.png │ │ └── Contents.json │ ├── arrow_diagDown_yellow.imageset │ │ ├── arrow_diagDown_yellow.png │ │ └── Contents.json │ ├── arrow_doubleDown_gray.imageset │ │ ├── arrow_doubleDown_gray.png │ │ └── Contents.json │ ├── arrow_doubleUp_yellow.imageset │ │ ├── arrow_doubleUp_yellow.png │ │ └── Contents.json │ ├── arrow_singleDown_gray.imageset │ │ ├── arrow_singleDown_gray.png │ │ └── Contents.json │ ├── arrow_singleUp_yellow.imageset │ │ ├── arrow_singleUp_green.png │ │ └── Contents.json │ ├── arrow_doubleDown_green.imageset │ │ ├── arrow_doubleDown_green.png │ │ └── Contents.json │ ├── arrow_singleDown_green.imageset │ │ ├── arrow_singleDown_green.png │ │ └── Contents.json │ ├── arrow_doubleDown_yellow.imageset │ │ ├── arrow_doubleDown_yellow.png │ │ └── Contents.json │ ├── arrow_singleDown_yellow.imageset │ │ ├── arrow_singleDown_yellow.png │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── TableInterfaceController.h ├── Info.plist ├── TableInterfaceController.m └── Base.lproj │ └── Interface.storyboard ├── NightscoutWatch.xcodeproj ├── xcuserdata │ └── derekclark.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ ├── NightscoutWatch.xcscheme │ │ ├── NightscoutWatch WatchKit App.xcscheme │ │ └── Glance - NightscoutWatch WatchKit App.xcscheme └── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ └── derekclark.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ └── NightscoutWatch.xccheckout ├── NightscoutWatch ├── AppDelegate.h ├── NightscoutWatch.entitlements ├── main.m ├── ViewController.h ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── AppDelegate.m ├── ViewController.m └── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard ├── README.md ├── NightscoutWatchTests ├── Info.plist └── NightscoutWatchTests.m └── LICENSE /NightscoutWatch WatchKit Extension/Images.xcassets/README__ignoredByTemplate__: -------------------------------------------------------------------------------- 1 | Did you know that git does not support storing empty directories? 2 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/NS_raw_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/NS_raw_20.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/NS_raw_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/NS_raw_21.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/line@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/line@2x.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_over_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_over_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_diagUp_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_diagUp_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_over_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_over_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_over_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_over_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_diagDown_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_diagDown_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_diagDown_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_diagDown_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_diagUp_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_diagUp_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_diagUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_diagUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_diagUp_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_diagUp_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_doubleUp_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_doubleUp_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_doubleUp_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_doubleUp_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_over_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_over_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_singleUp_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_singleUp_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_singleUp_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_singleUp_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_diagDown_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_diagDown_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_diagDown_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_diagDown_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_doubleDown_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_doubleDown_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_doubleDown_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_doubleDown_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_doubleUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_doubleUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_doubleUp_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_doubleUp_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_singleDown_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_singleDown_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_singleDown_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_singleDown_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_singleUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_singleUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_singleUp_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_singleUp_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_doubleDown_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_doubleDown_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_doubleDown_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_doubleDown_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_singleDown_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_singleDown_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/arrow_singleDown_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/arrow_singleDown_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch.xcodeproj/xcuserdata/derekclark.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/line.imageset/line@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/line.imageset/line@2x-1.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/line.imageset/line@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/line.imageset/line@2x.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_over_red.imageset/arrow_over_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_over_red.imageset/arrow_over_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_over_gray.imageset/arrow_over_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_over_gray.imageset/arrow_over_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_red.imageset/arrow_diagUp_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_red.imageset/arrow_diagUp_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_over_green.imageset/arrow_over_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_over_green.imageset/arrow_over_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_gray.imageset/arrow_diagUp_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_gray.imageset/arrow_diagUp_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_over_yellow.imageset/arrow_over_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_over_yellow.imageset/arrow_over_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_red.imageset/arrow_over_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_red.imageset/arrow_over_red.png -------------------------------------------------------------------------------- /NightscoutWatch.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_gray.imageset/arrow_diagDown_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_gray.imageset/arrow_diagDown_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_red.imageset/arrow_diagDown_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_red.imageset/arrow_diagDown_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_green.imageset/arrow_diagUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_green.imageset/arrow_diagUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_yellow.imageset/arrow_diagUp_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_yellow.imageset/arrow_diagUp_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_gray.imageset/arrow_doubleUp_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_gray.imageset/arrow_doubleUp_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_red.imageset/arrow_doubleUp_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_red.imageset/arrow_doubleUp_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_gray.imageset/arrow_singleUp_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_gray.imageset/arrow_singleUp_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_red.imageset/arrow_singleUp_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_red.imageset/arrow_singleUp_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_red.imageset/arrow_diagUp_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_red.imageset/arrow_diagUp_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_gray.imageset/arrow_over_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_gray.imageset/arrow_over_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_green.imageset/arrow_over_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_green.imageset/arrow_over_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_green.imageset/arrow_diagDown_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_green.imageset/arrow_diagDown_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_red.imageset/arrow_doubleDown_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_red.imageset/arrow_doubleDown_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_green.imageset/arrow_doubleUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_green.imageset/arrow_doubleUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_red.imageset/arrow_singleDown_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_red.imageset/arrow_singleDown_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_green.imageset/arrow_singleUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_green.imageset/arrow_singleUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_gray.imageset/arrow_diagUp_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_gray.imageset/arrow_diagUp_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_yellow.imageset/arrow_over_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_yellow.imageset/arrow_over_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_yellow.imageset/arrow_diagDown_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_yellow.imageset/arrow_diagDown_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_gray.imageset/arrow_doubleDown_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_gray.imageset/arrow_doubleDown_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_yellow.imageset/arrow_doubleUp_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_yellow.imageset/arrow_doubleUp_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_gray.imageset/arrow_singleDown_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_gray.imageset/arrow_singleDown_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_yellow.imageset/arrow_singleUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_yellow.imageset/arrow_singleUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_red.imageset/arrow_diagDown_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_red.imageset/arrow_diagDown_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_green.imageset/arrow_diagUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_green.imageset/arrow_diagUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_red.imageset/arrow_doubleUp_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_red.imageset/arrow_doubleUp_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_red.imageset/arrow_singleUp_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_red.imageset/arrow_singleUp_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_green.imageset/arrow_doubleDown_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_green.imageset/arrow_doubleDown_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_green.imageset/arrow_singleDown_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_green.imageset/arrow_singleDown_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_gray.imageset/arrow_diagDown_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_gray.imageset/arrow_diagDown_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_yellow.imageset/arrow_diagUp_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_yellow.imageset/arrow_diagUp_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_gray.imageset/arrow_doubleUp_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_gray.imageset/arrow_doubleUp_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_gray.imageset/arrow_singleUp_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_gray.imageset/arrow_singleUp_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_yellow.imageset/arrow_doubleDown_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_yellow.imageset/arrow_doubleDown_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_yellow.imageset/arrow_singleDown_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_yellow.imageset/arrow_singleDown_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_green.imageset/arrow_diagDown_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_green.imageset/arrow_diagDown_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_yellow.imageset/arrow_diagDown_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_yellow.imageset/arrow_diagDown_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_gray.imageset/arrow_doubleDown_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_gray.imageset/arrow_doubleDown_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_red.imageset/arrow_doubleDown_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_red.imageset/arrow_doubleDown_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_green.imageset/arrow_doubleUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_green.imageset/arrow_doubleUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_yellow.imageset/arrow_doubleUp_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_yellow.imageset/arrow_doubleUp_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_gray.imageset/arrow_singleDown_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_gray.imageset/arrow_singleDown_gray.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_red.imageset/arrow_singleDown_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_red.imageset/arrow_singleDown_red.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_green.imageset/arrow_singleUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_green.imageset/arrow_singleUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_yellow.imageset/arrow_singleUp_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_yellow.imageset/arrow_singleUp_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_green.imageset/arrow_doubleDown_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_green.imageset/arrow_doubleDown_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_green.imageset/arrow_singleDown_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_green.imageset/arrow_singleDown_green.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_yellow.imageset/arrow_doubleDown_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_yellow.imageset/arrow_doubleDown_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_yellow.imageset/arrow_singleDown_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_yellow.imageset/arrow_singleDown_yellow.png -------------------------------------------------------------------------------- /NightscoutWatch.xcodeproj/project.xcworkspace/xcuserdata/derekclark.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nightscout/nightscout-apple-watch/HEAD/NightscoutWatch.xcodeproj/project.xcworkspace/xcuserdata/derekclark.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/BGHistoryTableRow.m: -------------------------------------------------------------------------------- 1 | // 2 | // BGHistoryTableRow.m 3 | // NightscoutWatch 4 | // 5 | // Created by Derek Clark on 5/8/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import "BGHistoryTableRow.h" 10 | 11 | @implementation BGHistoryTableRow 12 | @synthesize deltaLabel,sgvLabel,timeLabel; 13 | @end 14 | -------------------------------------------------------------------------------- /NightscoutWatch/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // NightscoutWatch 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /NightscoutWatch/NightscoutWatch.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.dc.Nightscout.watch 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # nightscout-apple-watch 2 | nightscout apple watch app 3 | 4 | Apple Watch App for viewing nightscout data. 5 | 6 | App is available for download here - https://itunes.apple.com/us/app/mybg-continuous-glucose-monitor/id993805949?ls=1&mt=8 7 | 8 | As always, this app is for educational and informational purposes only. At no time should this app be used to make any medical decisions. 9 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/NightscoutWatch WatchKit Extension.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.application-groups 6 | 7 | group.com.dc.Nightscout.watch 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /NightscoutWatch/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // NightscoutWatch 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /NightscoutWatch.xcodeproj/project.xcworkspace/xcuserdata/derekclark.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagUp_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_over_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_over_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_over_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_over_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_over_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_over_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagDown_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagUp_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagUp_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleUp_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_over_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_over_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleUp_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_over_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_over_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagDown_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagDown_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagDown_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagDown_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_diagUp_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagUp_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleDown_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleDown_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleUp_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleUp_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleUp_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleUp_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleDown_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleDown_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleUp_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleUp_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleUp_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleUp_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagDown_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagUp_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagUp_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagUp_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleUp_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_over_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_over_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_over_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleUp_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleDown_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_doubleDown_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleDown_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleDown_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/arrow_singleDown_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleDown_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagDown_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagDown_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagUp_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagUp_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleDown_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleUp_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleUp_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_red.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleDown_red.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleUp_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleUp_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleUp_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleUp_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/line.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "line@2x-1.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "line@2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_diagDown_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_diagDown_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleDown_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleDown_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleDown_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleDown_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_doubleUp_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_doubleUp_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleDown_gray.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleDown_green.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Images.xcassets/arrow_singleDown_yellow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "arrow_singleDown_yellow.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/BGHistoryTableRow.h: -------------------------------------------------------------------------------- 1 | // 2 | // BGHistoryTableRow.h 3 | // NightscoutWatch 4 | // 5 | // Created by Derek Clark on 5/8/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface BGHistoryTableRow : NSObject 13 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *deltaLabel; 14 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *sgvLabel; 15 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *timeLabel; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /NightscoutWatch/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // NightscoutWatch 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UISegmentedControl *unitsControl; 14 | @property (weak, nonatomic) IBOutlet UITextField *websiteText; 15 | - (IBAction)submitClicked:(id)sender; 16 | - (IBAction)unitsChanged:(id)sender; 17 | @property (weak, nonatomic) IBOutlet UISegmentedControl *rangeControl; 18 | - (IBAction)rangeChanged:(id)sender; 19 | - (IBAction)feedbackClicked:(id)sender; 20 | 21 | @end 22 | 23 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/TableInterfaceController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TableInterfaceController.h 3 | // NightscoutWatch 4 | // 5 | // Created by Derek Clark on 5/8/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface TableInterfaceController : WKInterfaceController 13 | @property (weak, nonatomic) IBOutlet WKInterfaceTable *bgHistoryTable; 14 | @property (nonatomic, strong) NSMutableArray *deltaListArray; 15 | @property (nonatomic, strong) NSMutableArray *dateListArray; 16 | @property (nonatomic, strong) NSMutableArray *sgvListArray; 17 | @property (nonatomic, strong)NSString *myUrl; 18 | @property (nonatomic) int units; 19 | @property (nonatomic) int range; 20 | @end 21 | -------------------------------------------------------------------------------- /NightscoutWatch/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /NightscoutWatchTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.dc.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/GlanceController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GlanceController.h 3 | // NightscoutWatch WatchKit Extension 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface GlanceController : WKInterfaceController 13 | 14 | @property (nonatomic, strong)NSString *myUrl; 15 | @property (nonatomic) int units; 16 | @property (nonatomic) int range; 17 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *BGLabel; 18 | @property (weak, nonatomic) IBOutlet WKInterfaceImage *arrowImg; 19 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *delta; 20 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *raw; 21 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *lastReading; 22 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *battery; 23 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *lastReadingText; 24 | @property (nonatomic, strong) NSString *arrow; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/InterfaceController.h: -------------------------------------------------------------------------------- 1 | // 2 | // InterfaceController.h 3 | // NightscoutWatch WatchKit Extension 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface InterfaceController : WKInterfaceController 13 | 14 | @property (nonatomic, strong)NSString *myUrl; 15 | @property (nonatomic) int units; 16 | @property (nonatomic) int range; 17 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *BGLabel; 18 | @property (weak, nonatomic) IBOutlet WKInterfaceImage *arrowImg; 19 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *delta; 20 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *raw; 21 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *lastReading; 22 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *battery; 23 | @property (weak, nonatomic) IBOutlet WKInterfaceLabel *lastReadingText; 24 | @property (nonatomic, strong) NSString *arrow; 25 | @end 26 | -------------------------------------------------------------------------------- /NightscoutWatchTests/NightscoutWatchTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // NightscoutWatchTests.m 3 | // NightscoutWatchTests 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface NightscoutWatchTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation NightscoutWatchTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 clarky07 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /NightscoutWatch.xcodeproj/xcuserdata/derekclark.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Glance - NightscoutWatch WatchKit App.xcscheme 8 | 9 | orderHint 10 | 2 11 | 12 | NightscoutWatch WatchKit App.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | NightscoutWatch.xcscheme 18 | 19 | orderHint 20 | 0 21 | 22 | 23 | SuppressBuildableAutocreation 24 | 25 | F38C9A5E1AF8103C00FAA910 26 | 27 | primary 28 | 29 | 30 | F38C9A771AF8103C00FAA910 31 | 32 | primary 33 | 34 | 35 | F38C9A991AF8106500FAA910 36 | 37 | primary 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | myBG 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | com.dc.NightscoutWatch.watchkitapp 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | myBG 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 7 25 | UISupportedInterfaceOrientations 26 | 27 | UIInterfaceOrientationPortrait 28 | UIInterfaceOrientationPortraitUpsideDown 29 | 30 | WKCompanionAppBundleIdentifier 31 | com.dc.NightscoutWatch 32 | WKWatchKitApp 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | myBG 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | com.dc.NightscoutWatch.watchkitextension 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | myBG 17 | CFBundlePackageType 18 | XPC! 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 7 25 | NSExtension 26 | 27 | NSExtensionAttributes 28 | 29 | WKAppBundleIdentifier 30 | com.dc.NightscoutWatch.watchkitapp 31 | 32 | NSExtensionPointIdentifier 33 | com.apple.watchkit 34 | 35 | RemoteInterfacePrincipalClass 36 | InterfaceController 37 | 38 | 39 | -------------------------------------------------------------------------------- /NightscoutWatch/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | myBG 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | com.dc.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | myBG 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 7 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "24x24", 5 | "idiom" : "watch", 6 | "scale" : "2x", 7 | "role" : "notificationCenter", 8 | "subtype" : "38mm" 9 | }, 10 | { 11 | "size" : "27.5x27.5", 12 | "idiom" : "watch", 13 | "scale" : "2x", 14 | "role" : "notificationCenter", 15 | "subtype" : "42mm" 16 | }, 17 | { 18 | "size" : "29x29", 19 | "idiom" : "watch", 20 | "role" : "companionSettings", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "size" : "29x29", 25 | "idiom" : "watch", 26 | "role" : "companionSettings", 27 | "scale" : "3x" 28 | }, 29 | { 30 | "size" : "40x40", 31 | "idiom" : "watch", 32 | "scale" : "2x", 33 | "role" : "appLauncher", 34 | "subtype" : "38mm" 35 | }, 36 | { 37 | "size" : "44x44", 38 | "idiom" : "watch", 39 | "scale" : "2x", 40 | "role" : "longLook", 41 | "subtype" : "42mm" 42 | }, 43 | { 44 | "size" : "86x86", 45 | "idiom" : "watch", 46 | "scale" : "2x", 47 | "role" : "quickLook", 48 | "subtype" : "38mm" 49 | }, 50 | { 51 | "size" : "98x98", 52 | "idiom" : "watch", 53 | "scale" : "2x", 54 | "role" : "quickLook", 55 | "subtype" : "42mm" 56 | } 57 | ], 58 | "info" : { 59 | "version" : 1, 60 | "author" : "xcode" 61 | } 62 | } -------------------------------------------------------------------------------- /NightscoutWatch.xcodeproj/project.xcworkspace/xcshareddata/NightscoutWatch.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 1801B509-76D1-4878-9D5C-E5244D57C2EA 9 | IDESourceControlProjectName 10 | NightscoutWatch 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 21A5B72E0F8DB89277521E560EB1BBC1ACC568FF 14 | https://github.com/clarky07/nightscout-apple-watch.git 15 | 16 | IDESourceControlProjectPath 17 | NightscoutWatch.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 21A5B72E0F8DB89277521E560EB1BBC1ACC568FF 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/clarky07/nightscout-apple-watch.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 21A5B72E0F8DB89277521E560EB1BBC1ACC568FF 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 21A5B72E0F8DB89277521E560EB1BBC1ACC568FF 36 | IDESourceControlWCCName 37 | nightscout-apple-watch 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /NightscoutWatch/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // NightscoutWatch 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | 21 | NSUserDefaults *myDefaults = [NSUserDefaults standardUserDefaults]; 22 | 23 | BOOL first_time = [[myDefaults objectForKey:@"FIRST_TIME"] boolValue]; 24 | 25 | if (!first_time) { 26 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Welcome" message:@"This app is for educational and informational purposes only. At no time should this app be used to make any medical decisions." delegate:nil cancelButtonTitle:@"Accept" otherButtonTitles:nil, nil]; 27 | 28 | [alert show]; 29 | [myDefaults setObject:[NSNumber numberWithBool:true] forKey:@"FIRST_TIME"]; 30 | } 31 | 32 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.com.dc.Nightscout.watch"]; 33 | 34 | int units = [[mySharedDefaults objectForKey:@"NIGHTSCOUT_UNITS"] intValue]; 35 | 36 | return YES; 37 | } 38 | 39 | 40 | - (void)applicationWillResignActive:(UIApplication *)application { 41 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 42 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 43 | } 44 | 45 | - (void)applicationDidEnterBackground:(UIApplication *)application { 46 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 47 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 48 | } 49 | 50 | - (void)applicationWillEnterForeground:(UIApplication *)application { 51 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 52 | } 53 | 54 | - (void)applicationDidBecomeActive:(UIApplication *)application { 55 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 56 | } 57 | 58 | - (void)applicationWillTerminate:(UIApplication *)application { 59 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /NightscoutWatch/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // NightscoutWatch 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | @synthesize websiteText,unitsControl,rangeControl; 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | // Do any additional setup after loading the view, typically from a nib. 21 | 22 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.com.dc.Nightscout.watch"]; 23 | 24 | NSString *temp = [mySharedDefaults objectForKey:@"NIGHTSCOUTURL"]; 25 | 26 | temp = [temp stringByReplacingOccurrencesOfString:@"https://" withString:@""]; 27 | 28 | websiteText.text = [temp stringByReplacingOccurrencesOfString:@"http://" withString:@""]; 29 | 30 | int units = [[mySharedDefaults objectForKey:@"NIGHTSCOUT_UNITS"] intValue]; 31 | 32 | [unitsControl setSelectedSegmentIndex:units]; 33 | 34 | int range = [[mySharedDefaults objectForKey:@"NIGHTSCOUT_RANGE"] intValue]; 35 | 36 | [rangeControl setSelectedSegmentIndex:range]; 37 | 38 | websiteText.delegate = self; 39 | } 40 | 41 | - (void)didReceiveMemoryWarning { 42 | [super didReceiveMemoryWarning]; 43 | // Dispose of any resources that can be recreated. 44 | } 45 | 46 | - (BOOL)textFieldShouldEndEditing:(UITextField *)textField{ 47 | return YES; 48 | } 49 | 50 | - (BOOL)textFieldShouldReturn:(UITextField *)textField 51 | { 52 | [textField resignFirstResponder]; 53 | 54 | return YES; 55 | 56 | } 57 | 58 | - (IBAction)submitClicked:(id)sender { 59 | 60 | 61 | 62 | NSString *url = websiteText.text; 63 | 64 | NSString *temp = [url stringByReplacingOccurrencesOfString:@"https://" withString:@""]; 65 | 66 | temp = [temp stringByReplacingOccurrencesOfString:@"http://" withString:@""]; 67 | 68 | url = [NSString stringWithFormat:@"https://%@",url]; 69 | 70 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.com.dc.Nightscout.watch"]; 71 | 72 | [mySharedDefaults setObject:url forKey:@"NIGHTSCOUTURL"]; 73 | [mySharedDefaults synchronize]; 74 | 75 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Success" message:@"Url saved" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil]; 76 | 77 | [alert show]; 78 | } 79 | 80 | - (IBAction)unitsChanged:(id)sender { 81 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.com.dc.Nightscout.watch"]; 82 | 83 | [mySharedDefaults setObject:[NSNumber numberWithInteger:[unitsControl selectedSegmentIndex]] forKey:@"NIGHTSCOUT_UNITS"]; 84 | [mySharedDefaults synchronize]; 85 | } 86 | 87 | 88 | - (IBAction)rangeChanged:(id)sender { 89 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.com.dc.Nightscout.watch"]; 90 | 91 | [mySharedDefaults setObject:[NSNumber numberWithInteger:[rangeControl selectedSegmentIndex]] forKey:@"NIGHTSCOUT_RANGE"]; 92 | [mySharedDefaults synchronize]; 93 | } 94 | 95 | - (IBAction)feedbackClicked:(id)sender { 96 | 97 | NSURL *url = [NSURL URLWithString:@"http://goo.gl/forms/AlFHDhCKW9"]; 98 | [[UIApplication sharedApplication] openURL:url]; 99 | 100 | } 101 | 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /NightscoutWatch/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /NightscoutWatch.xcodeproj/xcuserdata/derekclark.xcuserdatad/xcschemes/NightscoutWatch.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /NightscoutWatch.xcodeproj/xcuserdata/derekclark.xcuserdatad/xcschemes/NightscoutWatch WatchKit App.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 60 | 61 | 67 | 68 | 69 | 70 | 79 | 83 | 89 | 90 | 91 | 92 | 98 | 99 | 100 | 101 | 102 | 103 | 109 | 113 | 119 | 120 | 121 | 122 | 128 | 129 | 130 | 131 | 133 | 134 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /NightscoutWatch.xcodeproj/xcuserdata/derekclark.xcuserdatad/xcschemes/Glance - NightscoutWatch WatchKit App.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 60 | 61 | 67 | 68 | 69 | 70 | 80 | 84 | 90 | 91 | 92 | 93 | 99 | 100 | 101 | 102 | 103 | 104 | 111 | 115 | 121 | 122 | 123 | 124 | 130 | 131 | 132 | 133 | 135 | 136 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/TableInterfaceController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TableInterfaceController.m 3 | // NightscoutWatch 4 | // 5 | // Created by Derek Clark on 5/8/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import "TableInterfaceController.h" 10 | #import "BGHistoryTableRow.h" 11 | 12 | @interface TableInterfaceController () 13 | 14 | @end 15 | 16 | @implementation TableInterfaceController 17 | @synthesize deltaListArray, dateListArray, sgvListArray,bgHistoryTable,myUrl,units,range; 18 | 19 | - (void)awakeWithContext:(id)context { 20 | [super awakeWithContext:context]; 21 | deltaListArray = [[NSMutableArray alloc] initWithCapacity:0]; 22 | dateListArray = [[NSMutableArray alloc] initWithCapacity:0]; 23 | sgvListArray = [[NSMutableArray alloc] initWithCapacity:0]; 24 | 25 | // Configure interface objects here. 26 | } 27 | 28 | - (void)willActivate { 29 | // This method is called when watch view controller is about to be visible to user 30 | [super willActivate]; 31 | 32 | [deltaListArray removeAllObjects]; 33 | [dateListArray removeAllObjects]; 34 | [sgvListArray removeAllObjects]; 35 | 36 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.com.dc.Nightscout.watch"]; 37 | myUrl = [mySharedDefaults objectForKey:@"NIGHTSCOUTURL"]; 38 | units = [[mySharedDefaults objectForKey:@"NIGHTSCOUT_UNITS"] intValue]; 39 | range = [[mySharedDefaults objectForKey:@"NIGHTSCOUT_RANGE"] intValue]; 40 | 41 | [self performSelectorInBackground:@selector(setup) withObject:nil]; 42 | } 43 | 44 | - (void)didDeactivate { 45 | // This method is called when watch view controller is no longer visible 46 | [super didDeactivate]; 47 | } 48 | 49 | -(void) setup 50 | { 51 | NSString *thisUrl = [myUrl stringByAppendingString:@"/api/v1/entries.json?count=21"]; 52 | 53 | NSURL *nightScoutUrl = [NSURL URLWithString:thisUrl]; 54 | 55 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:nightScoutUrl 56 | cachePolicy:NSURLRequestReloadIgnoringLocalCacheData 57 | timeoutInterval:60]; 58 | [request setHTTPMethod:@"GET"]; 59 | 60 | NSURLResponse * response = nil; 61 | NSError * error = nil; 62 | NSData * data = [NSURLConnection sendSynchronousRequest:request 63 | returningResponse:&response 64 | error:&error]; 65 | 66 | 67 | 68 | if (error == nil) 69 | { 70 | NSArray *sgvArray = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; 71 | 72 | for (int i = 0; i < (int)([sgvArray count]-1); i++) 73 | { 74 | NSDictionary *jsonDict = [sgvArray objectAtIndex:i]; 75 | NSDictionary *nextDict = [sgvArray objectAtIndex:i+1]; 76 | 77 | id temp = [jsonDict objectForKey:@"sgv"]; 78 | NSString *sgv; 79 | if ([temp isKindOfClass:[NSString class]]) 80 | { 81 | sgv = temp; 82 | } 83 | else 84 | { 85 | sgv = [temp stringValue]; 86 | } 87 | 88 | NSString *nextSgv = [nextDict objectForKey:@"sgv"]; 89 | 90 | int sgvInt = [sgv intValue]; 91 | int nextSgvInt = [nextSgv intValue]; 92 | 93 | int delta = sgvInt - nextSgvInt; 94 | 95 | [deltaListArray addObject:[NSString stringWithFormat:@"%d", delta]]; 96 | [sgvListArray addObject:sgv]; 97 | 98 | NSString *datetime = [jsonDict objectForKey:@"date"]; 99 | 100 | long dateInt = [datetime longLongValue]; 101 | 102 | NSDate *date = [NSDate dateWithTimeIntervalSince1970:dateInt/1000]; 103 | NSDateFormatter *dateFormatter1 = [[NSDateFormatter alloc] init]; 104 | [dateFormatter1 setDateFormat:@"h:mm a"]; 105 | NSString *timeString = [dateFormatter1 stringFromDate:date]; 106 | 107 | [dateListArray addObject:timeString]; 108 | 109 | } 110 | 111 | 112 | [self performSelectorOnMainThread:@selector(configureTableWithData:) withObject:nil waitUntilDone:false]; 113 | } 114 | } 115 | 116 | - (void)configureTableWithData:(NSArray*)dataObjects { 117 | 118 | 119 | [bgHistoryTable setNumberOfRows:[deltaListArray count] withRowType:@"BGHistoryTableRow"]; 120 | for (NSInteger i = 0; i < bgHistoryTable.numberOfRows; i++) { 121 | BGHistoryTableRow* theRow = [bgHistoryTable rowControllerAtIndex:i]; 122 | 123 | NSString* delta = [deltaListArray objectAtIndex:i]; 124 | NSString* sgv = [sgvListArray objectAtIndex:i]; 125 | NSString* time = [dateListArray objectAtIndex:i]; 126 | 127 | 128 | BOOL mgdl = true; 129 | 130 | if (units == 1) 131 | { 132 | mgdl = false; 133 | } 134 | 135 | int sgvInt = [sgv intValue]; 136 | 137 | int deltaInt = [delta intValue]; 138 | 139 | if (deltaInt > 0) 140 | { 141 | if (mgdl) 142 | { 143 | delta = [NSString stringWithFormat:@"+%@",delta]; 144 | } 145 | else 146 | { 147 | delta = [NSString stringWithFormat:@"+%.1f",((double)deltaInt*.0555)]; 148 | } 149 | 150 | } 151 | else 152 | { 153 | if (!mgdl) 154 | { 155 | delta = [NSString stringWithFormat:@"%.1f",((double)deltaInt*.0555)]; 156 | } 157 | 158 | } 159 | 160 | if (!mgdl) 161 | { 162 | [theRow.sgvLabel setText:[NSString stringWithFormat:@"%.1f", sgvInt*0.0555]]; 163 | } 164 | else 165 | { 166 | [theRow.sgvLabel setText:sgv]; 167 | } 168 | 169 | 170 | [theRow.deltaLabel setText:delta]; 171 | [theRow.timeLabel setText:time]; 172 | 173 | int yellowRange = 200; 174 | int greenRange = 100; 175 | 176 | if (range == 1) 177 | { 178 | yellowRange = 180; 179 | greenRange = 80; 180 | } 181 | 182 | if (sgvInt > yellowRange) //yellow 183 | { 184 | [theRow.sgvLabel setTextColor:[UIColor colorWithRed:247.0/255.0 green:172.0/255.0 blue:11.0/255.0 alpha:1.0]]; 185 | 186 | } 187 | else if (sgvInt >= greenRange) //green 188 | { 189 | [theRow.sgvLabel setTextColor:[UIColor colorWithRed:51.0/255.0 green:189.0/255.0 blue:71.0/255.0 alpha:1.0]]; 190 | } 191 | else // red 192 | { 193 | [theRow.sgvLabel setTextColor:[UIColor colorWithRed:247.0/255.0 green:72.0/255.0 blue:11.0/255.0 alpha:1.0]]; 194 | } 195 | 196 | if (i==0) 197 | { 198 | [theRow.deltaLabel setTextColor:[UIColor whiteColor]]; 199 | [theRow.timeLabel setTextColor:[UIColor whiteColor]]; 200 | } 201 | else 202 | { 203 | [theRow.deltaLabel setTextColor:[UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1.0]]; 204 | [theRow.timeLabel setTextColor:[UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1.0]]; 205 | } 206 | } 207 | } 208 | 209 | @end 210 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /NightscoutWatch/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 46 | 54 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/InterfaceController.m: -------------------------------------------------------------------------------- 1 | // 2 | // InterfaceController.m 3 | // NightscoutWatch WatchKit Extension 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import "InterfaceController.h" 10 | 11 | 12 | @interface InterfaceController() 13 | 14 | @end 15 | 16 | 17 | @implementation InterfaceController 18 | @synthesize myUrl,BGLabel,arrowImg,delta,raw,lastReading,battery,lastReadingText,units,range,arrow; 19 | 20 | - (void)awakeWithContext:(id)context { 21 | [super awakeWithContext:context]; 22 | 23 | arrow = @""; 24 | // Configure interface objects here. 25 | } 26 | 27 | - (void)willActivate { 28 | // This method is called when watch view controller is about to be visible to user 29 | [super willActivate]; 30 | 31 | [BGLabel setTextColor:[UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1.0]]; 32 | [lastReading setText:@"?"]; 33 | 34 | 35 | if ([arrow isEqualToString:@"DoubleUp"]) 36 | { 37 | [arrowImg setImageNamed:@"arrow_doubleUp_gray"]; 38 | } 39 | else if ([arrow isEqualToString:@"SingleUp"]) 40 | { 41 | [arrowImg setImageNamed:@"arrow_singleUp_gray"]; 42 | } 43 | else if ([arrow isEqualToString:@"FortyFiveUp"]) 44 | { 45 | [arrowImg setImageNamed:@"arrow_diagUp_gray"]; 46 | } 47 | else if ([arrow isEqualToString:@"Flat"]) 48 | { 49 | [arrowImg setImageNamed:@"arrow_over_gray"]; 50 | } 51 | else if ([arrow isEqualToString:@"FortyFiveDown"]) 52 | { 53 | [arrowImg setImageNamed:@"arrow_diagDown_gray"]; 54 | } 55 | else if ([arrow isEqualToString:@"SingleDown"]) 56 | { 57 | [arrowImg setImageNamed:@"arrow_singleDown_gray"]; 58 | } 59 | else if ([arrow isEqualToString:@"DoubleDown"]) 60 | { 61 | [arrowImg setImageNamed:@"arrow_doubleDown_gray"]; 62 | } 63 | else 64 | { 65 | [arrowImg setHidden:true]; 66 | } 67 | 68 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.com.dc.Nightscout.watch"]; 69 | 70 | units = [[mySharedDefaults objectForKey:@"NIGHTSCOUT_UNITS"] intValue]; 71 | myUrl = [mySharedDefaults objectForKey:@"NIGHTSCOUTURL"]; 72 | range = [[mySharedDefaults objectForKey:@"NIGHTSCOUT_RANGE"] intValue]; 73 | 74 | [self performSelectorInBackground:@selector(setup) withObject:nil]; 75 | 76 | } 77 | 78 | -(void)setupDisplay:(NSDictionary *)jsonDict 79 | { 80 | NSArray *bgsArray = [jsonDict objectForKey:@"bgs"]; 81 | 82 | if ([bgsArray count] > 0) 83 | { 84 | NSDictionary *myDict = [bgsArray objectAtIndex:0]; 85 | 86 | 87 | NSString *sgv = [myDict objectForKey:@"sgv"]; 88 | [BGLabel setText:[NSString stringWithFormat:@"%@", sgv]]; 89 | 90 | arrow = [myDict objectForKey:@"direction"]; 91 | 92 | int sgvInt = [sgv intValue]; 93 | 94 | BOOL mgdl = true; 95 | 96 | if (units == 1) 97 | { 98 | mgdl = false; 99 | } 100 | 101 | 102 | int yellowRange = 200; 103 | int greenRange = 100; 104 | 105 | 106 | if (range == 1) 107 | { 108 | yellowRange = 180; 109 | greenRange = 80; 110 | } 111 | 112 | if (!mgdl) 113 | { 114 | yellowRange *= .0555; 115 | greenRange *= .0555; 116 | } 117 | 118 | if (sgvInt > yellowRange) //yellow 119 | { 120 | [BGLabel setTextColor:[UIColor colorWithRed:247.0/255.0 green:172.0/255.0 blue:11.0/255.0 alpha:1.0]]; 121 | 122 | } 123 | else if (sgvInt >= greenRange) //green 124 | { 125 | [BGLabel setTextColor:[UIColor colorWithRed:51.0/255.0 green:189.0/255.0 blue:71.0/255.0 alpha:1.0]]; 126 | } 127 | else // red 128 | { 129 | [BGLabel setTextColor:[UIColor colorWithRed:247.0/255.0 green:72.0/255.0 blue:11.0/255.0 alpha:1.0]]; 130 | } 131 | 132 | [arrowImg setHidden:false]; 133 | 134 | 135 | if ([arrow isEqualToString:@"NOT COMPUTABLE"]) 136 | { 137 | [arrowImg setHidden:true]; 138 | } 139 | else if ([arrow isEqualToString:@"NONE"]) 140 | { 141 | [arrowImg setHidden:true]; 142 | 143 | } 144 | else if ([arrow isEqualToString:@"DoubleUp"]) 145 | { 146 | if (sgvInt > yellowRange) //yellow 147 | { 148 | [arrowImg setImageNamed:@"arrow_doubleUp_yellow"]; 149 | 150 | } 151 | else if (sgvInt >= greenRange) //green 152 | { 153 | [arrowImg setImageNamed:@"arrow_doubleUp_green"]; 154 | } 155 | else // red 156 | { 157 | [arrowImg setImageNamed:@"arrow_doubleUp_red"]; 158 | } 159 | } 160 | else if ([arrow isEqualToString:@"SingleUp"]) 161 | { 162 | if (sgvInt > yellowRange) //yellow 163 | { 164 | [arrowImg setImageNamed:@"arrow_singleUp_yellow"]; 165 | 166 | } 167 | else if (sgvInt >= greenRange) //green 168 | { 169 | [arrowImg setImageNamed:@"arrow_singleUp_green"]; 170 | } 171 | else // red 172 | { 173 | [arrowImg setImageNamed:@"arrow_singleUp_red"]; 174 | } 175 | } 176 | else if ([arrow isEqualToString:@"FortyFiveUp"]) 177 | { 178 | if (sgvInt > yellowRange) //yellow 179 | { 180 | [arrowImg setImageNamed:@"arrow_diagUp_yellow"]; 181 | 182 | } 183 | else if (sgvInt >= greenRange) //green 184 | { 185 | [arrowImg setImageNamed:@"arrow_diagUp_green"]; 186 | } 187 | else // red 188 | { 189 | [arrowImg setImageNamed:@"arrow_diagUp_red"]; 190 | } 191 | } 192 | else if ([arrow isEqualToString:@"Flat"]) 193 | { 194 | if (sgvInt > yellowRange) //yellow 195 | { 196 | [arrowImg setImageNamed:@"arrow_over_yellow"]; 197 | 198 | } 199 | else if (sgvInt >= greenRange) //green 200 | { 201 | [arrowImg setImageNamed:@"arrow_over_green"]; 202 | } 203 | else // red 204 | { 205 | [arrowImg setImageNamed:@"arrow_over_red"]; 206 | } 207 | } 208 | else if ([arrow isEqualToString:@"FortyFiveDown"]) 209 | { 210 | if (sgvInt > yellowRange) //yellow 211 | { 212 | [arrowImg setImageNamed:@"arrow_diagDown_yellow"]; 213 | 214 | } 215 | else if (sgvInt >= greenRange) //green 216 | { 217 | [arrowImg setImageNamed:@"arrow_diagDown_green"]; 218 | } 219 | else // red 220 | { 221 | [arrowImg setImageNamed:@"arrow_diagDown_red"]; 222 | } 223 | } 224 | else if ([arrow isEqualToString:@"SingleDown"]) 225 | { 226 | if (sgvInt > yellowRange) //yellow 227 | { 228 | [arrowImg setImageNamed:@"arrow_singleDown_yellow"]; 229 | 230 | } 231 | else if (sgvInt >= greenRange) //green 232 | { 233 | [arrowImg setImageNamed:@"arrow_singleDown_green"]; 234 | } 235 | else // red 236 | { 237 | [arrowImg setImageNamed:@"arrow_singleDown_red"]; 238 | } 239 | } 240 | else if ([arrow isEqualToString:@"DoubleDown"]) 241 | { 242 | if (sgvInt > yellowRange) //yellow 243 | { 244 | [arrowImg setImageNamed:@"arrow_doubleDown_yellow"]; 245 | 246 | } 247 | else if (sgvInt >= greenRange) //green 248 | { 249 | [arrowImg setImageNamed:@"arrow_doubleDown_green"]; 250 | } 251 | else // red 252 | { 253 | [arrowImg setImageNamed:@"arrow_doubleDown_red"]; 254 | } 255 | } 256 | else if ([arrow isEqualToString:@"RATE OUT OF RANGE"]) 257 | { 258 | [arrowImg setHidden:true]; 259 | } 260 | 261 | NSString *batteryText = [myDict objectForKey:@"battery"]; 262 | [battery setText:[NSString stringWithFormat:@"%@%%",batteryText]]; 263 | 264 | NSString *deltaText = [myDict objectForKey:@"bgdelta"]; 265 | 266 | int deltaInt = [deltaText intValue]; 267 | 268 | 269 | 270 | if (deltaInt > 0) 271 | { 272 | if (mgdl) 273 | { 274 | [delta setText:[NSString stringWithFormat:@"+%@ mg/dl",deltaText]]; 275 | } 276 | else 277 | { 278 | [delta setText:[NSString stringWithFormat:@"+%@ mmol",deltaText]]; 279 | } 280 | 281 | } 282 | else 283 | { 284 | if (mgdl) 285 | { 286 | [delta setText:[NSString stringWithFormat:@"%@ mg/dl",deltaText]]; 287 | } 288 | else 289 | { 290 | [delta setText:[NSString stringWithFormat:@"%@ mmol",deltaText]]; 291 | } 292 | 293 | } 294 | 295 | NSString *unfiltered = [myDict objectForKey:@"unfiltered"]; 296 | 297 | int unfilteredInt = [unfiltered intValue]; 298 | 299 | NSString *filtered = [myDict objectForKey:@"filtered"]; 300 | 301 | int filteredInt = [filtered intValue]; 302 | 303 | NSArray *calsArray = [jsonDict objectForKey:@"cals"]; 304 | 305 | if ([calsArray count] > 0) 306 | { 307 | NSDictionary *myDict2 = [calsArray objectAtIndex:0]; 308 | 309 | NSString *intercept = [myDict2 objectForKey:@"intercept"]; 310 | 311 | double interceptDouble = [intercept doubleValue]; 312 | 313 | NSString *scale = [myDict2 objectForKey:@"scale"]; 314 | 315 | double scaleDouble = [scale doubleValue]; 316 | 317 | NSString *slope = [myDict2 objectForKey:@"slope"]; 318 | 319 | double slopeDouble = [slope doubleValue]; 320 | 321 | 322 | double currentCalcRaw = 0.0; 323 | double currentRatio = 0.0; 324 | double currentConvBG = sgvInt; 325 | 326 | BOOL specialVal = false; 327 | 328 | if (sgvInt < 30) 329 | { 330 | specialVal = true; 331 | } 332 | 333 | 334 | 335 | if (mgdl) 336 | { 337 | if (sgvInt < 30) 338 | { 339 | specialVal = true; 340 | } 341 | } 342 | else 343 | { 344 | if (sgvInt < 1.7) 345 | { 346 | specialVal = true; 347 | } 348 | currentConvBG = (int)((sgvInt * 18.018)+0.5); 349 | } 350 | 351 | 352 | if (specialVal) { 353 | currentCalcRaw = (scaleDouble * (unfilteredInt - interceptDouble) / slopeDouble); 354 | } 355 | else { 356 | currentRatio = (scaleDouble * (filteredInt - interceptDouble) / slopeDouble / currentConvBG); 357 | currentCalcRaw = (scaleDouble * (unfilteredInt - interceptDouble) / slopeDouble / currentRatio); 358 | } 359 | 360 | int formatRaw = 0; 361 | 362 | if (mgdl) 363 | { 364 | formatRaw = (int)(currentCalcRaw + 0.5); 365 | } 366 | else 367 | { 368 | formatRaw = (int)(currentCalcRaw*0.0555 + 0.5); 369 | } 370 | 371 | [raw setText:[NSString stringWithFormat:@"%d",formatRaw]]; 372 | 373 | } 374 | else 375 | { 376 | [raw setText:[NSString stringWithFormat:@"?"]]; 377 | } 378 | 379 | 380 | NSString *datetime = [myDict objectForKey:@"datetime"]; 381 | 382 | long dateInt = [datetime longLongValue]; 383 | 384 | NSDate *date = [NSDate dateWithTimeIntervalSince1970:dateInt/1000]; 385 | 386 | 387 | int seconds = [date timeIntervalSinceNow]; 388 | 389 | int minutes = seconds / -60; 390 | 391 | [lastReading setText:[NSString stringWithFormat:@"%dm",minutes]]; 392 | 393 | if (minutes>5) 394 | { 395 | [lastReading setTextColor:[UIColor colorWithRed:247.0/255.0 green:72.0/255.0 blue:11.0/255.0 alpha:1.0]]; 396 | [lastReadingText setTextColor:[UIColor colorWithRed:247.0/255.0 green:72.0/255.0 blue:11.0/255.0 alpha:1.0]]; 397 | [BGLabel setTextColor:[UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1.0]]; 398 | 399 | if ([arrow isEqualToString:@"DoubleUp"]) 400 | { 401 | [arrowImg setImageNamed:@"arrow_doubleUp_gray"]; 402 | } 403 | else if ([arrow isEqualToString:@"SingleUp"]) 404 | { 405 | [arrowImg setImageNamed:@"arrow_singleUp_gray"]; 406 | } 407 | else if ([arrow isEqualToString:@"FortyFiveUp"]) 408 | { 409 | [arrowImg setImageNamed:@"arrow_diagUp_gray"]; 410 | } 411 | else if ([arrow isEqualToString:@"Flat"]) 412 | { 413 | [arrowImg setImageNamed:@"arrow_over_gray"]; 414 | } 415 | else if ([arrow isEqualToString:@"FortyFiveDown"]) 416 | { 417 | [arrowImg setImageNamed:@"arrow_diagDown_gray"]; 418 | } 419 | else if ([arrow isEqualToString:@"SingleDown"]) 420 | { 421 | [arrowImg setImageNamed:@"arrow_singleDown_gray"]; 422 | } 423 | else if ([arrow isEqualToString:@"DoubleDown"]) 424 | { 425 | [arrowImg setImageNamed:@"arrow_doubleDown_gray"]; 426 | } 427 | 428 | } 429 | else 430 | { 431 | [lastReading setTextColor:[UIColor whiteColor]]; 432 | [lastReadingText setTextColor:[UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1.0]]; 433 | } 434 | 435 | 436 | } 437 | 438 | 439 | 440 | 441 | 442 | } 443 | 444 | -(void) setup 445 | { 446 | NSString *thisUrl = [myUrl stringByAppendingString:@"/pebble"]; 447 | 448 | NSURL *nightScoutUrl = [NSURL URLWithString:thisUrl]; 449 | 450 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:nightScoutUrl 451 | cachePolicy:NSURLRequestReloadIgnoringLocalCacheData 452 | timeoutInterval:60]; 453 | [request setHTTPMethod:@"GET"]; 454 | 455 | NSURLResponse * response = nil; 456 | NSError * error = nil; 457 | NSData * data = [NSURLConnection sendSynchronousRequest:request 458 | returningResponse:&response 459 | error:&error]; 460 | 461 | 462 | 463 | if (error == nil) 464 | { 465 | NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; 466 | 467 | [self performSelectorOnMainThread:@selector(setupDisplay:) withObject:jsonDict waitUntilDone:false]; 468 | 469 | } 470 | 471 | } 472 | 473 | - (void)didDeactivate { 474 | // This method is called when watch view controller is no longer visible 475 | [super didDeactivate]; 476 | 477 | } 478 | 479 | @end 480 | 481 | 482 | 483 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit Extension/GlanceController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GlanceController.m 3 | // NightscoutWatch WatchKit Extension 4 | // 5 | // Created by Derek Clark on 5/4/15. 6 | // Copyright (c) 2015 30 South. All rights reserved. 7 | // 8 | 9 | #import "GlanceController.h" 10 | 11 | 12 | @interface GlanceController() 13 | 14 | @end 15 | 16 | 17 | @implementation GlanceController 18 | @synthesize myUrl,BGLabel,arrowImg,delta,raw,lastReading,battery,lastReadingText,units,range,arrow; 19 | 20 | - (void)awakeWithContext:(id)context { 21 | [super awakeWithContext:context]; 22 | 23 | arrow = @""; 24 | // Configure interface objects here. 25 | } 26 | 27 | - (void)willActivate { 28 | // This method is called when watch view controller is about to be visible to user 29 | [super willActivate]; 30 | 31 | [BGLabel setTextColor:[UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1.0]]; 32 | [lastReading setText:@"?"]; 33 | 34 | 35 | if ([arrow isEqualToString:@"DoubleUp"]) 36 | { 37 | [arrowImg setImageNamed:@"arrow_doubleUp_gray"]; 38 | } 39 | else if ([arrow isEqualToString:@"SingleUp"]) 40 | { 41 | [arrowImg setImageNamed:@"arrow_singleUp_gray"]; 42 | } 43 | else if ([arrow isEqualToString:@"FortyFiveUp"]) 44 | { 45 | [arrowImg setImageNamed:@"arrow_diagUp_gray"]; 46 | } 47 | else if ([arrow isEqualToString:@"Flat"]) 48 | { 49 | [arrowImg setImageNamed:@"arrow_over_gray"]; 50 | } 51 | else if ([arrow isEqualToString:@"FortyFiveDown"]) 52 | { 53 | [arrowImg setImageNamed:@"arrow_diagDown_gray"]; 54 | } 55 | else if ([arrow isEqualToString:@"SingleDown"]) 56 | { 57 | [arrowImg setImageNamed:@"arrow_singleDown_gray"]; 58 | } 59 | else if ([arrow isEqualToString:@"DoubleDown"]) 60 | { 61 | [arrowImg setImageNamed:@"arrow_doubleDown_gray"]; 62 | } 63 | else 64 | { 65 | [arrowImg setHidden:true]; 66 | } 67 | 68 | NSUserDefaults *mySharedDefaults = [[NSUserDefaults alloc] initWithSuiteName: @"group.com.dc.Nightscout.watch"]; 69 | 70 | units = [[mySharedDefaults objectForKey:@"NIGHTSCOUT_UNITS"] intValue]; 71 | myUrl = [mySharedDefaults objectForKey:@"NIGHTSCOUTURL"]; 72 | range = [[mySharedDefaults objectForKey:@"NIGHTSCOUT_RANGE"] intValue]; 73 | 74 | [self performSelectorInBackground:@selector(setup) withObject:nil]; 75 | 76 | } 77 | 78 | -(void)setupDisplay:(NSDictionary *)jsonDict 79 | { 80 | NSArray *bgsArray = [jsonDict objectForKey:@"bgs"]; 81 | 82 | if ([bgsArray count] > 0) 83 | { 84 | NSDictionary *myDict = [bgsArray objectAtIndex:0]; 85 | 86 | 87 | NSString *sgv = [myDict objectForKey:@"sgv"]; 88 | [BGLabel setText:[NSString stringWithFormat:@"%@", sgv]]; 89 | 90 | arrow = [myDict objectForKey:@"direction"]; 91 | 92 | int sgvInt = [sgv intValue]; 93 | 94 | BOOL mgdl = true; 95 | 96 | if (units == 1) 97 | { 98 | mgdl = false; 99 | } 100 | 101 | 102 | int yellowRange = 200; 103 | int greenRange = 100; 104 | 105 | 106 | if (range == 1) 107 | { 108 | yellowRange = 180; 109 | greenRange = 80; 110 | } 111 | 112 | if (!mgdl) 113 | { 114 | yellowRange *= .0555; 115 | greenRange *= .0555; 116 | } 117 | 118 | if (sgvInt > yellowRange) //yellow 119 | { 120 | [BGLabel setTextColor:[UIColor colorWithRed:247.0/255.0 green:172.0/255.0 blue:11.0/255.0 alpha:1.0]]; 121 | 122 | } 123 | else if (sgvInt >= greenRange) //green 124 | { 125 | [BGLabel setTextColor:[UIColor colorWithRed:51.0/255.0 green:189.0/255.0 blue:71.0/255.0 alpha:1.0]]; 126 | } 127 | else // red 128 | { 129 | [BGLabel setTextColor:[UIColor colorWithRed:247.0/255.0 green:72.0/255.0 blue:11.0/255.0 alpha:1.0]]; 130 | } 131 | 132 | [arrowImg setHidden:false]; 133 | 134 | 135 | if ([arrow isEqualToString:@"NOT COMPUTABLE"]) 136 | { 137 | [arrowImg setHidden:true]; 138 | } 139 | else if ([arrow isEqualToString:@"NONE"]) 140 | { 141 | [arrowImg setHidden:true]; 142 | 143 | } 144 | else if ([arrow isEqualToString:@"DoubleUp"]) 145 | { 146 | if (sgvInt > yellowRange) //yellow 147 | { 148 | [arrowImg setImageNamed:@"arrow_doubleUp_yellow"]; 149 | 150 | } 151 | else if (sgvInt >= greenRange) //green 152 | { 153 | [arrowImg setImageNamed:@"arrow_doubleUp_green"]; 154 | } 155 | else // red 156 | { 157 | [arrowImg setImageNamed:@"arrow_doubleUp_red"]; 158 | } 159 | } 160 | else if ([arrow isEqualToString:@"SingleUp"]) 161 | { 162 | if (sgvInt > yellowRange) //yellow 163 | { 164 | [arrowImg setImageNamed:@"arrow_singleUp_yellow"]; 165 | 166 | } 167 | else if (sgvInt >= greenRange) //green 168 | { 169 | [arrowImg setImageNamed:@"arrow_singleUp_green"]; 170 | } 171 | else // red 172 | { 173 | [arrowImg setImageNamed:@"arrow_singleUp_red"]; 174 | } 175 | } 176 | else if ([arrow isEqualToString:@"FortyFiveUp"]) 177 | { 178 | if (sgvInt > yellowRange) //yellow 179 | { 180 | [arrowImg setImageNamed:@"arrow_diagUp_yellow"]; 181 | 182 | } 183 | else if (sgvInt >= greenRange) //green 184 | { 185 | [arrowImg setImageNamed:@"arrow_diagUp_green"]; 186 | } 187 | else // red 188 | { 189 | [arrowImg setImageNamed:@"arrow_diagUp_red"]; 190 | } 191 | } 192 | else if ([arrow isEqualToString:@"Flat"]) 193 | { 194 | if (sgvInt > yellowRange) //yellow 195 | { 196 | [arrowImg setImageNamed:@"arrow_over_yellow"]; 197 | 198 | } 199 | else if (sgvInt >= greenRange) //green 200 | { 201 | [arrowImg setImageNamed:@"arrow_over_green"]; 202 | } 203 | else // red 204 | { 205 | [arrowImg setImageNamed:@"arrow_over_red"]; 206 | } 207 | } 208 | else if ([arrow isEqualToString:@"FortyFiveDown"]) 209 | { 210 | if (sgvInt > yellowRange) //yellow 211 | { 212 | [arrowImg setImageNamed:@"arrow_diagDown_yellow"]; 213 | 214 | } 215 | else if (sgvInt >= greenRange) //green 216 | { 217 | [arrowImg setImageNamed:@"arrow_diagDown_green"]; 218 | } 219 | else // red 220 | { 221 | [arrowImg setImageNamed:@"arrow_diagDown_red"]; 222 | } 223 | } 224 | else if ([arrow isEqualToString:@"SingleDown"]) 225 | { 226 | if (sgvInt > yellowRange) //yellow 227 | { 228 | [arrowImg setImageNamed:@"arrow_singleDown_yellow"]; 229 | 230 | } 231 | else if (sgvInt >= greenRange) //green 232 | { 233 | [arrowImg setImageNamed:@"arrow_singleDown_green"]; 234 | } 235 | else // red 236 | { 237 | [arrowImg setImageNamed:@"arrow_singleDown_red"]; 238 | } 239 | } 240 | else if ([arrow isEqualToString:@"DoubleDown"]) 241 | { 242 | if (sgvInt > yellowRange) //yellow 243 | { 244 | [arrowImg setImageNamed:@"arrow_doubleDown_yellow"]; 245 | 246 | } 247 | else if (sgvInt >= greenRange) //green 248 | { 249 | [arrowImg setImageNamed:@"arrow_doubleDown_green"]; 250 | } 251 | else // red 252 | { 253 | [arrowImg setImageNamed:@"arrow_doubleDown_red"]; 254 | } 255 | } 256 | else if ([arrow isEqualToString:@"RATE OUT OF RANGE"]) 257 | { 258 | [arrowImg setHidden:true]; 259 | } 260 | 261 | NSString *batteryText = [myDict objectForKey:@"battery"]; 262 | [battery setText:[NSString stringWithFormat:@"%@%%",batteryText]]; 263 | 264 | NSString *deltaText = [myDict objectForKey:@"bgdelta"]; 265 | 266 | int deltaInt = [deltaText intValue]; 267 | 268 | 269 | 270 | if (deltaInt > 0) 271 | { 272 | if (mgdl) 273 | { 274 | [delta setText:[NSString stringWithFormat:@"+%@ mg/dl",deltaText]]; 275 | } 276 | else 277 | { 278 | [delta setText:[NSString stringWithFormat:@"+%@ mmol",deltaText]]; 279 | } 280 | 281 | } 282 | else 283 | { 284 | if (mgdl) 285 | { 286 | [delta setText:[NSString stringWithFormat:@"%@ mg/dl",deltaText]]; 287 | } 288 | else 289 | { 290 | [delta setText:[NSString stringWithFormat:@"%@ mmol",deltaText]]; 291 | } 292 | 293 | } 294 | 295 | NSString *unfiltered = [myDict objectForKey:@"unfiltered"]; 296 | 297 | int unfilteredInt = [unfiltered intValue]; 298 | 299 | NSString *filtered = [myDict objectForKey:@"filtered"]; 300 | 301 | int filteredInt = [filtered intValue]; 302 | 303 | NSArray *calsArray = [jsonDict objectForKey:@"cals"]; 304 | 305 | if ([calsArray count] > 0) 306 | { 307 | NSDictionary *myDict2 = [calsArray objectAtIndex:0]; 308 | 309 | NSString *intercept = [myDict2 objectForKey:@"intercept"]; 310 | 311 | double interceptDouble = [intercept doubleValue]; 312 | 313 | NSString *scale = [myDict2 objectForKey:@"scale"]; 314 | 315 | double scaleDouble = [scale doubleValue]; 316 | 317 | NSString *slope = [myDict2 objectForKey:@"slope"]; 318 | 319 | double slopeDouble = [slope doubleValue]; 320 | 321 | 322 | double currentCalcRaw = 0.0; 323 | double currentRatio = 0.0; 324 | double currentConvBG = sgvInt; 325 | 326 | BOOL specialVal = false; 327 | 328 | if (sgvInt < 30) 329 | { 330 | specialVal = true; 331 | } 332 | 333 | 334 | 335 | if (mgdl) 336 | { 337 | if (sgvInt < 30) 338 | { 339 | specialVal = true; 340 | } 341 | } 342 | else 343 | { 344 | if (sgvInt < 1.7) 345 | { 346 | specialVal = true; 347 | } 348 | currentConvBG = (int)((sgvInt * 18.018)+0.5); 349 | } 350 | 351 | 352 | if (specialVal) { 353 | currentCalcRaw = (scaleDouble * (unfilteredInt - interceptDouble) / slopeDouble); 354 | } 355 | else { 356 | currentRatio = (scaleDouble * (filteredInt - interceptDouble) / slopeDouble / currentConvBG); 357 | currentCalcRaw = (scaleDouble * (unfilteredInt - interceptDouble) / slopeDouble / currentRatio); 358 | } 359 | 360 | int formatRaw = 0; 361 | 362 | if (mgdl) 363 | { 364 | formatRaw = (int)(currentCalcRaw + 0.5); 365 | } 366 | else 367 | { 368 | formatRaw = (int)(currentCalcRaw*0.0555 + 0.5); 369 | } 370 | 371 | [raw setText:[NSString stringWithFormat:@"%d",formatRaw]]; 372 | 373 | } 374 | else 375 | { 376 | [raw setText:[NSString stringWithFormat:@"?"]]; 377 | } 378 | 379 | 380 | NSString *datetime = [myDict objectForKey:@"datetime"]; 381 | 382 | long dateInt = [datetime longLongValue]; 383 | 384 | NSDate *date = [NSDate dateWithTimeIntervalSince1970:dateInt/1000]; 385 | 386 | 387 | int seconds = [date timeIntervalSinceNow]; 388 | 389 | 390 | int minutes = seconds / -60; 391 | 392 | [lastReading setText:[NSString stringWithFormat:@"%dm",minutes]]; 393 | 394 | if (minutes>5) 395 | { 396 | [lastReading setTextColor:[UIColor colorWithRed:247.0/255.0 green:72.0/255.0 blue:11.0/255.0 alpha:1.0]]; 397 | [lastReadingText setTextColor:[UIColor colorWithRed:247.0/255.0 green:72.0/255.0 blue:11.0/255.0 alpha:1.0]]; 398 | [BGLabel setTextColor:[UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1.0]]; 399 | 400 | if ([arrow isEqualToString:@"DoubleUp"]) 401 | { 402 | [arrowImg setImageNamed:@"arrow_doubleUp_gray"]; 403 | } 404 | else if ([arrow isEqualToString:@"SingleUp"]) 405 | { 406 | [arrowImg setImageNamed:@"arrow_singleUp_gray"]; 407 | } 408 | else if ([arrow isEqualToString:@"FortyFiveUp"]) 409 | { 410 | [arrowImg setImageNamed:@"arrow_diagUp_gray"]; 411 | } 412 | else if ([arrow isEqualToString:@"Flat"]) 413 | { 414 | [arrowImg setImageNamed:@"arrow_over_gray"]; 415 | } 416 | else if ([arrow isEqualToString:@"FortyFiveDown"]) 417 | { 418 | [arrowImg setImageNamed:@"arrow_diagDown_gray"]; 419 | } 420 | else if ([arrow isEqualToString:@"SingleDown"]) 421 | { 422 | [arrowImg setImageNamed:@"arrow_singleDown_gray"]; 423 | } 424 | else if ([arrow isEqualToString:@"DoubleDown"]) 425 | { 426 | [arrowImg setImageNamed:@"arrow_doubleDown_gray"]; 427 | } 428 | 429 | } 430 | else 431 | { 432 | [lastReading setTextColor:[UIColor whiteColor]]; 433 | [lastReadingText setTextColor:[UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1.0]]; 434 | } 435 | 436 | 437 | } 438 | 439 | 440 | } 441 | 442 | -(void) setup 443 | { 444 | NSString *thisUrl = [myUrl stringByAppendingString:@"/pebble"]; 445 | 446 | 447 | NSURL *nightScoutUrl = [NSURL URLWithString:thisUrl]; 448 | 449 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:nightScoutUrl 450 | cachePolicy:NSURLRequestReloadIgnoringLocalCacheData 451 | timeoutInterval:60]; 452 | [request setHTTPMethod:@"GET"]; 453 | 454 | NSURLResponse * response = nil; 455 | NSError * error = nil; 456 | NSData * data = [NSURLConnection sendSynchronousRequest:request 457 | returningResponse:&response 458 | error:&error]; 459 | 460 | 461 | 462 | if (error == nil) 463 | { 464 | 465 | NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; 466 | 467 | [self performSelectorOnMainThread:@selector(setupDisplay:) withObject:jsonDict waitUntilDone:false]; 468 | 469 | } 470 | 471 | } 472 | 473 | - (void)didDeactivate { 474 | // This method is called when watch view controller is no longer visible 475 | [super didDeactivate]; 476 | 477 | } 478 | 479 | @end 480 | 481 | 482 | -------------------------------------------------------------------------------- /NightscoutWatch WatchKit App/Base.lproj/Interface.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 42 | 46 | 47 | 48 | 49 | 50 | 51 | 55 | 59 | 60 | 61 | 62 | 63 | 64 | 68 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 116 | 119 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 |
139 |
140 | 141 | 142 | 143 |
144 |
145 | 146 |
147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 175 | 179 | 180 | 181 | 182 | 183 | 184 | 188 | 192 | 193 | 194 | 195 | 196 | 197 | 201 | 205 | 206 | 207 | 208 | 209 | 210 | 214 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 |
239 |
240 | --------------------------------------------------------------------------------