Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ before_script:
script:
# Build the app target
- set -o pipefail && xcodebuild -project Loop.xcodeproj -scheme Loop build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty
- set -o pipefail && xcodebuild -project Loop.xcodeproj -scheme Learn build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty
# Run the test target
- set -o pipefail && xcodebuild -project Loop.xcodeproj -scheme LoopTests -destination 'name=iPhone SE' test | xcpretty
- set -o pipefail && xcodebuild -project Loop.xcodeproj -scheme DoseMathTests -destination 'name=iPhone SE' test | xcpretty
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github "LoopKit/Amplitude-iOS" "2137d5fd44bf630ed33e1e72d7af6d8f8612f270"
github "LoopKit/CGMBLEKit" "ea1267791c66e884f1013fffd36faf4555cc6eaf"
github "LoopKit/G4ShareSpy" "fed5a389e3e47e3a1953878dd21852aa5f44b360"
github "LoopKit/LoopKit" "797a4fffeb0b56c8ce47543ea6516b3b8c8e0857"
github "LoopKit/LoopKit" "c6e9f9200deec9a401ab1725e888451b17dee98a"
github "LoopKit/dexcom-share-client-swift" "b0419edf55c7f389b36cb47dd5c376bbd3d03d69"
github "i-schuetz/SwiftCharts" "0.6.2"
github "ps2/rileylink_ios" "23af71639041ca3a2a1b4120d3cd0a06c5d3fa01"
github "ps2/rileylink_ios" "8418b57c1983bdefaec7ccb456c86d5efacf40e7"
9 changes: 1 addition & 8 deletions Common/Extensions/HKUnit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import HealthKit
import LoopCore

// Code in this extension is duplicated from:
// https://github.com/LoopKit/LoopKit/blob/master/LoopKit/HKUnit.swift
Expand All @@ -21,14 +22,6 @@ extension HKUnit {
}
}

static let milligramsPerDeciliter: HKUnit = {
return HKUnit.gramUnit(with: .milli).unitDivided(by: HKUnit.literUnit(with: .deci))
}()

static let millimolesPerLiter: HKUnit = {
return HKUnit.moleUnit(with: .milli, molarMass: HKUnitMolarMassBloodGlucose).unitDivided(by: HKUnit.liter())
}()

var localizedShortUnitString: String {
if self == HKUnit.millimolesPerLiter {
return NSLocalizedString("mmol/L", comment: "The short unit display string for millimoles of glucose per liter")
Expand Down
8 changes: 8 additions & 0 deletions Common/Extensions/NSTimeInterval.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ extension TimeInterval {
return TimeInterval(hours: hours)
}

static func days(_ days: Double) -> TimeInterval {
return TimeInterval(days: days)
}

init(minutes: Double) {
self.init(minutes * 60)
}
Expand All @@ -30,6 +34,10 @@ extension TimeInterval {
self.init(minutes: hours * 60)
}

init(days: Double) {
self.init(hours: days * 24)
}

var minutes: Double {
return self / 60.0
}
Expand Down
1 change: 1 addition & 0 deletions Common/Extensions/NewCarbEntryIntent+Loop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import LoopCore

@available(iOS 12.0, watchOSApplicationExtension 5.0, *)
extension NewCarbEntryIntent: IdentifiableClass { }
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import LoopKitUI
import LoopUI


extension TextFieldTableViewCell: NibLoadable { }
89 changes: 0 additions & 89 deletions Common/Models/Insulin/ExponentialInsulinModelPreset.swift

This file was deleted.

2 changes: 2 additions & 0 deletions Common/Models/LoopSettingsUserInfo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Copyright © 2018 LoopKit Authors. All rights reserved.
//

import LoopCore


struct LoopSettingsUserInfo {
let settings: LoopSettings
Expand Down
1 change: 1 addition & 0 deletions DoseMathTests/DoseMathTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import XCTest
import HealthKit
import LoopKit
import LoopCore


extension XCTestCase {
Expand Down
61 changes: 61 additions & 0 deletions Learn/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//
// AppDelegate.swift
// Learn
//
// Copyright © 2019 LoopKit Authors. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

guard
let nav = window?.rootViewController as? UINavigationController,
let lessonsVC = nav.topViewController as? LessonsViewController
else {
return false
}

let dataManager = DataManager()
dataManager.authorize({
DispatchQueue.main.async {
lessonsVC.lessons = [
TimeInRangeLesson(dataManager: dataManager)
]
}
})

return true
}

func applicationWillResignActive(_ application: UIApplication) {
// 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.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// 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.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// 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.
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

98 changes: 98 additions & 0 deletions Learn/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
6 changes: 6 additions & 0 deletions Learn/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
25 changes: 25 additions & 0 deletions Learn/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
Loading