Skip to content

Commit

Permalink
Merge pull request #403 from LoopKit/dev
Browse files Browse the repository at this point in the history
Version 1.3.0
  • Loading branch information
ps2 authored Mar 13, 2017
2 parents 94d75d9 + e3efa6d commit 5196bcd
Show file tree
Hide file tree
Showing 272 changed files with 4,025 additions and 2,027 deletions.
4 changes: 2 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "LoopKit/LoopKit" ~> 1.1.0
github "LoopKit/LoopKit" ~> 1.2.0
github "LoopKit/xDripG5" ~> 0.8.0
github "i-schuetz/SwiftCharts" ~> 0.5.0
github "mddub/dexcom-share-client-swift" ~> 0.2.0
github "mddub/G4ShareSpy" ~> 0.3.1
github "ps2/rileylink_ios" ~> 0.13
github "ps2/rileylink_ios" ~> 1.0
github "amplitude/Amplitude-iOS" ~> 3.8.5
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "amplitude/Amplitude-iOS" "v3.11.1"
github "amplitude/Amplitude-iOS" "v3.14.0"
github "mddub/G4ShareSpy" "v0.3.1"
github "LoopKit/LoopKit" "v1.1.0"
github "LoopKit/LoopKit" "v1.2.0"
github "i-schuetz/SwiftCharts" "0.5.1"
github "mddub/dexcom-share-client-swift" "v0.2.0"
github "ps2/rileylink_ios" "v0.13"
github "ps2/rileylink_ios" "v1.0"
github "LoopKit/xDripG5" "v0.8.0"
Binary file modified Carthage/Build/iOS/Amplitude.framework/Amplitude
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Carthage/Build/iOS/Amplitude.framework/Headers/AMPUtils.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions Carthage/Build/iOS/Amplitude.framework/Headers/Amplitude.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/Amplitude.framework/Info.plist
Binary file not shown.
Binary file modified Carthage/Build/iOS/CarbKit.framework/CarbKit
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/CarbKit.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/Crypto.framework/Crypto
Binary file not shown.
Binary file modified Carthage/Build/iOS/Crypto.framework/Info.plist
Binary file not shown.
Binary file modified Carthage/Build/iOS/G4ShareSpy.framework/G4ShareSpy
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/G4ShareSpy.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/GlucoseKit.framework/GlucoseKit
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/GlucoseKit.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/InsulinKit.framework/Info.plist
Binary file not shown.
Binary file modified Carthage/Build/iOS/InsulinKit.framework/InsulinKit
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/LoopKit.framework/Assets.car
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions Carthage/Build/iOS/LoopKit.framework/Headers/LoopKit-Swift.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/LoopKit.framework/Info.plist
Binary file not shown.
Binary file modified Carthage/Build/iOS/LoopKit.framework/LoopKit
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/LoopKit.framework/TextFieldTableViewCell.nib
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/MinimedKit.framework/Info.plist
Binary file not shown.
Binary file modified Carthage/Build/iOS/MinimedKit.framework/MinimedKit
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/NightscoutUploadKit.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/RileyLinkBLEKit.framework/Info.plist
Binary file not shown.
Binary file modified Carthage/Build/iOS/RileyLinkBLEKit.framework/RileyLinkBLEKit
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/RileyLinkKit.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/RileyLinkKit.framework/RileyLinkKit
Binary file not shown.
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/ShareClient.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/ShareClient.framework/ShareClient
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/SwiftCharts.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/SwiftCharts.framework/SwiftCharts
Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified Carthage/Build/iOS/xDripG5.framework/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Carthage/Build/iOS/xDripG5.framework/xDripG5
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import HealthKit
// Code in this extension is duplicated from:
// https://github.com/LoopKit/LoopKit/blob/master/LoopKit/HKUnit.swift
// to avoid pulling in the LoopKit extension since it's not extension-API safe.
public extension HKUnit {
extension HKUnit {
// A formatting helper for determining the preferred decimal style for a given unit
var preferredMinimumFractionDigits: Int {
var preferredFractionDigits: Int {
if self.unitString == "mg/dL" {
return 0
} else {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@ extension Bundle {
return String(format: NSLocalizedString("%1$@ v%2$@", comment: "The format string for the app name and version number. (1: bundle name)(2: bundle version)"), bundleDisplayName, shortVersionString)
}

private var mainAppBundleIdentifier: String? {
return object(forInfoDictionaryKey: "MainAppBundleIdentifier") as? String
}

var appGroupSuiteName: String {
return object(forInfoDictionaryKey: "AppGroupIdentifier") as! String
}

var mainAppUrl: URL? {
if let mainAppBundleIdentifier = mainAppBundleIdentifier {
return URL(string: "\(mainAppBundleIdentifier)://")
} else {
return nil
}
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ extension UserDefaults {
case StatusExtensionContext = "com.loopkit.Loop.StatusExtensionContext"
}

var statusExtensionContextObservableKey: String {
return Key.StatusExtensionContext.rawValue
}

var statusExtensionContext: StatusExtensionContext? {
get {
if let rawValue = dictionary(forKey: Key.StatusExtensionContext.rawValue) {
Expand Down
File renamed without changes.
42 changes: 42 additions & 0 deletions Common/Extensions/NumberFormatter.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
//
// NSNumberFormatter.swift
// Loop
//
// Created by Nate Racklyeft on 9/5/16.
// Copyright © 2016 Nathan Racklyeft. All rights reserved.
//

import Foundation
import HealthKit


extension NumberFormatter {
static func glucoseFormatter(for unit: HKUnit) -> NumberFormatter {
let numberFormatter = NumberFormatter()

numberFormatter.numberStyle = .decimal
numberFormatter.minimumFractionDigits = unit.preferredFractionDigits
numberFormatter.maximumFractionDigits = unit.preferredFractionDigits
return numberFormatter
}

func describingGlucose(_ value: Double, for unit: HKUnit) -> String? {
guard let stringValue = string(from: NSNumber(value: value)) else {
return nil
}

return String(
format: NSLocalizedString("GLUCOSE_VALUE_AND_UNIT",
value: "%1$@ %2$@",
comment: "Format string for combining localized glucose value and unit. (1: glucose value)(2: unit)"
),
stringValue,
unit.glucoseUnitDisplayString
)
}

@nonobjc func describingGlucose(_ value: HKQuantity, for unit: HKUnit) -> String? {
return describingGlucose(value.doubleValue(for: unit), for: unit)
}

}
52 changes: 52 additions & 0 deletions Common/Extensions/UIColor+HIG.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// UIColor+HIG.swift
// Naterade
//
// Created by Nathan Racklyeft on 1/23/16.
// Copyright © 2016 Nathan Racklyeft. All rights reserved.
//

import UIKit


extension UIColor {
// MARK: - HIG colors
// See: https://developer.apple.com/ios/human-interface-guidelines/visual-design/color/

static func HIGTealBlueColor() -> UIColor {
return UIColor(red: 90 / 255, green: 200 / 255, blue: 250 / 255, alpha: 1)
}

static func HIGYellowColor() -> UIColor {
return UIColor(red: 1, green: 204 / 255, blue: 0, alpha: 1)
}

static func HIGOrangeColor() -> UIColor {
return UIColor(red: 1, green: 149 / 255, blue: 0 / 255, alpha: 1)
}

static func HIGPinkColor() -> UIColor {
return UIColor(red: 1, green: 45 / 255, blue: 85 / 255, alpha: 1)
}

static func HIGBlueColor() -> UIColor {
return UIColor(red: 0, green: 122 / 255, blue: 1, alpha: 1)
}

static func HIGGreenColor() -> UIColor {
return UIColor(red: 76 / 255, green: 217 / 255, blue: 100 / 255, alpha: 1)
}

static func HIGRedColor() -> UIColor {
return UIColor(red: 1, green: 59 / 255, blue: 48 / 255, alpha: 1)
}

static func HIGPurpleColor() -> UIColor {
return UIColor(red: 88 / 255, green: 86 / 255, blue: 214 / 255, alpha: 1)
}

static func HIGGrayColor() -> UIColor {
return UIColor(red: 142 / 255, green: 143 / 255, blue: 147 / 255, alpha: 1)
}

}
32 changes: 32 additions & 0 deletions Common/Extensions/UIColor.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// UIColor.swift
// Naterade
//
// Created by Nathan Racklyeft on 1/23/16.
// Copyright © 2016 Nathan Racklyeft. All rights reserved.
//

import UIKit


extension UIColor {
@nonobjc static var tintColor: UIColor? = nil

@nonobjc static let secondaryLabelColor = UIColor.HIGGrayColor()

@nonobjc static let cellBackgroundColor = UIColor(white: 239 / 255, alpha: 1)

@nonobjc static let gridColor = UIColor(white: 193 / 255, alpha: 1)

@nonobjc static let IOBTintColor = UIColor.HIGOrangeColor()

@nonobjc static let COBTintColor = UIColor(red: 99 / 255, green: 218 / 255, blue: 56 / 255, alpha: 1)

@nonobjc static let agingColor = UIColor.HIGYellowColor()

@nonobjc static let staleColor = UIColor.HIGRedColor()

@nonobjc static let unknownColor = UIColor(red: 198 / 255, green: 199 / 255, blue: 201 / 255, alpha: 1)

@nonobjc static let deleteColor = UIColor.HIGRedColor()
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation


enum GlucoseTrend: Int {
public enum GlucoseTrend: Int {
case upUpUp = 1
case upUp = 2
case up = 3
Expand Down
File renamed without changes.
Loading

0 comments on commit 5196bcd

Please sign in to comment.