Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7baefa9
agvtool
loudnate Jul 2, 2016
5597b99
Adding KeychainManager to handle credential storage
loudnate Jun 27, 2016
8c18956
Fixing travis lines
loudnate Jun 27, 2016
c3ec800
Travis
loudnate Jun 28, 2016
7b267b6
Fixing DoseMath tests
loudnate Jun 28, 2016
a70e1ad
Prep: refactoring remote services
loudnate Jul 1, 2016
5029dc6
Missed adjustment of pulling latest glucose
loudnate Jul 2, 2016
43d418e
Merge branch 'master' into dev
loudnate Jul 2, 2016
25b0c1c
Fixing memory leaks in the modal view controllers
loudnate Jul 2, 2016
d6b7872
Merge pull request #54 from loudnate/keychain
loudnate Jul 2, 2016
2b85bf3
Removing debugging statements
loudnate Jul 2, 2016
441ae66
Merge pull request #55 from loudnate/memory-leaks
loudnate Jul 2, 2016
c0a6e33
Allow dexcom credentials to be updated within the app settings
loudnate Jul 3, 2016
d5d7e13
Remove dev team ID
loudnate Jul 3, 2016
8c02d8d
Merge pull request #56 from loudnate/keychain-ui
loudnate Jul 3, 2016
f335557
Allow NIghtscout credentials to be updated within the app settings
loudnate Jul 4, 2016
2157d3e
Adding AmplitudeService to AnalyticsManager
loudnate Jul 4, 2016
85cc130
Merge pull request #57 from loudnate/keychain-ui
loudnate Jul 4, 2016
59ffd66
Creating a service auth for mLab
loudnate Jul 4, 2016
3570ebc
Adding UI for mLab and Amplitude auth
loudnate Jul 4, 2016
cc9b249
Updating README and settings text
loudnate Jul 4, 2016
7ac5da8
Merge pull request #59 from loudnate/keychain-ui
loudnate Jul 4, 2016
ef037ac
Emptying RemoteSettings-template.plist
loudnate Jul 4, 2016
67955bc
Clear "Loop Not Running" notifications when the number of configured …
loudnate Jul 4, 2016
2b6d4f4
Merge pull request #60 from loudnate/stop-notifications
loudnate Jul 4, 2016
a3133ea
Read glucose + pump data deterministically for x22 + G4 Share users
loudnate Jul 4, 2016
b3ef35a
Merge pull request #61 from loudnate/522-share-race
loudnate Jul 4, 2016
f8934f9
Fixing the transition state to Carb and Bolus entry view controllers
loudnate Jul 5, 2016
89b7e04
Merge pull request #62 from loudnate/fix-modal-transitions
loudnate Jul 5, 2016
d7928a3
One more fix after #62
loudnate Jul 5, 2016
3f01d8c
Fixing share backfill condition
loudnate Jul 5, 2016
f9a4f62
Backfill up to 6 values (30 minutes) of glucose from Share
loudnate Jul 5, 2016
039c526
Updating LoopKit to 0.3.4
loudnate Jul 6, 2016
8fa148a
Merge pull request #63 from loudnate/backfill-share
loudnate Jul 6, 2016
25330a0
agvtool 0.6.0
loudnate Jul 6, 2016
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
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ script:
# Build the app target
- xctool -project Loop.xcodeproj -scheme Loop build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
# Run the test target
- xctool -project Loop.xcodeproj -scheme LoopTests -sdk iphonesimulator9.3 test
- xcodebuild -project Loop.xcodeproj -scheme LoopTests -destination 'name=iPhone 6' test | xcpretty
- xctool -project Loop.xcodeproj -scheme DoseMathTests -sdk iphonesimulator9.3 test
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "loudnate/LoopKit" ~> 0.3.3
github "loudnate/LoopKit" ~> 0.3.4
github "loudnate/xDripG5" ~> 0.5.0
github "loudnate/SwiftCharts" "loudnate/naterade"
github "mddub/dexcom-share-client-swift" ~> 0.1
Expand Down
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github "amplitude/Amplitude-iOS" "a3d6720626e72a678489bce83ed9dacadb505dd7"
github "loudnate/Crypto" "13fee45175b88629aeabe60b4b4fc3daf86fa0a3"
github "loudnate/LoopKit" "v0.3.3"
github "loudnate/LoopKit" "v0.3.4"
github "loudnate/SwiftCharts" "8671287afb29640f9cffced6521b1098b7aac085"
github "mddub/dexcom-share-client-swift" "v0.1.3"
github "loudnate/xDripG5" "0.5.0"
Expand Down
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 modified Carthage/Build/iOS/CarbKit.framework/Info.plist
Binary file not shown.
Binary file modified Carthage/Build/iOS/GlucoseKit.framework/GlucoseKit
Binary file not shown.
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.
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 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 modified Carthage/Build/iOS/LoopKit.framework/TextFieldTableViewCell.nib
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ import InsulinKit
import LoopKit


extension XCTestCase {
public var bundle: NSBundle {
return NSBundle(forClass: self.dynamicType)
}

public func loadFixture<T>(resourceName: String) -> T {
let path = bundle.pathForResource(resourceName, ofType: "json")!
return try! NSJSONSerialization.JSONObjectWithData(NSData(contentsOfFile: path)!, options: []) as! T
}
}


public typealias JSONDictionary = [String: AnyObject]


extension NSDateFormatter {
static func ISO8601LocalTimeDateFormatter() -> Self {
let dateFormatter = self.init()
Expand Down
24 changes: 24 additions & 0 deletions DoseMathTests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>0.6.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
431 changes: 287 additions & 144 deletions Loop.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43E2D8FC1D20C508004DA55F"
BuildableName = "LoopTests2.xctest"
BlueprintName = "LoopTests2"
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down
56 changes: 56 additions & 0 deletions Loop.xcodeproj/xcshareddata/xcschemes/DoseMathTests.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43E2D8D01D20BF42004DA55F"
BuildableName = "DoseMathTests.xctest"
BlueprintName = "DoseMathTests"
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
32 changes: 12 additions & 20 deletions Loop.xcodeproj/xcshareddata/xcschemes/Loop.xcscheme
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.7">
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand Down Expand Up @@ -33,12 +33,22 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43F78D2A1C8FC58F002152D1"
BlueprintIdentifier = "43E2D90A1D20C581004DA55F"
BuildableName = "LoopTests.xctest"
BlueprintName = "LoopTests"
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43E2D8FC1D20C508004DA55F"
BuildableName = "LoopTests2.xctest"
BlueprintName = "LoopTests2"
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down Expand Up @@ -98,23 +108,5 @@
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
<PostActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "#!/bin/bash&#10;&#10;if [[ ! -d $SRCROOT ]]; then&#10;echo &quot;This script must be run from an Xcode Build Phase&quot;&#10;exit 1;&#10;fi&#10;&#10;# Globals&#10;Tag=&#10;Logfile=&#10;CFBundleVersion=&#10;CFBundleShortVersionString=&#10;&#10;function init_logging () {&#10; logdir=&quot;$HOME/Library/Logs/$PRODUCT_BUNDLE_IDENTIFIER&quot;&#10; mkdir -p $logdir&#10; Logfile=&quot;$logdir/archive_post_actions.log&quot;&#10; exec &gt;&gt; $Logfile 2&gt;&amp;1&#10;&#10; echo &quot;\n\n\n$(date) Beginning archive post-actions for $CONFIGURATION&quot;&#10;}&#10;&#10;function increment_bundle_version () {&#10; srcPlist=&quot;$1&quot;&#10; PlistBuddy=&quot;/usr/libexec/PlistBuddy&quot;&#10;&#10; CFBundleVersion=`$PlistBuddy -c &quot;Print CFBundleVersion&quot; $srcPlist`&#10; CFBundleShortVersionString=`$PlistBuddy -c &quot;Print CFBundleShortVersionString&quot; $srcPlist`&#10; Tag=&quot;v$CFBundleShortVersionString&quot;&#10;&#10; # Increment the bundle version for future builds&#10; CFBundleVersionNext=$(($CFBundleVersion + 1))&#10; $PlistBuddy -c &quot;Set :CFBundleVersion $CFBundleVersionNext&quot; $srcPlist&#10;&#10; echo &quot;Updated build number of $srcPlist to $CFBundleVersionNext&quot;&#10;&#10; # Copy the new version to the settings bundle&#10; # settingsPlist=&quot;$SRCROOT/$PRODUCT_NAME/Settings.bundle/Root.plist&quot;&#10; # $PlistBuddy -c &quot;Set :PreferenceSpecifiers:0:DefaultValue $CFBundleShortVersionString ($CFBundleVersionNext)&quot; $settingsPlist&#10;&#10; git add $srcPlist &gt;&gt; $Logfile 2&gt;&amp;1&#10;}&#10;&#10;function commit_and_tag_changes () {&#10; cd &quot;$SRCROOT&quot;&#10;&#10; git commit -m &quot;Auto-commit with archive $Tag&quot; &gt;&gt; $Logfile 2&gt;&amp;1&#10; git tag $Tag &gt;&gt; $Logfile 2&gt;&amp;1&#10; git push &gt;&gt; $Logfile 2&gt;&amp;1&#10; git push --tags &gt;&gt; $Logfile 2&gt;&amp;1&#10;&#10; cd -&#10;}&#10;&#10;function merge_to_master () {&#10; cd &quot;$SRCROOT&quot;&#10;&#10; branch=$(git symbolic-ref --short HEAD)&#10;&#10; git checkout master &gt;&gt; $Logfile 2&gt;&amp;1&#10; git merge &quot;$branch&quot; &gt;&gt; $Logfile 2&gt;&amp;1&#10; git push &gt;&gt; $Logfile 2&gt;&amp;1&#10; git checkout &quot;$branch&quot; &gt;&gt; $Logfile 2&gt;&amp;1&#10;&#10; cd -&#10;}&#10;&#10;## Run&#10;&#10;init_logging&#10;increment_bundle_version &quot;$SRCROOT/$INFOPLIST_FILE&quot;&#10;increment_bundle_version &quot;$SRCROOT/WatchApp/Info.plist&quot;&#10;commit_and_tag_changes&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43776F8B1B8022E90074EA36"
BuildableName = "Loop.app"
BlueprintName = "Loop"
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PostActions>
</ArchiveAction>
</Scheme>
10 changes: 10 additions & 0 deletions Loop.xcodeproj/xcshareddata/xcschemes/LoopTests.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43E2D8FC1D20C508004DA55F"
BuildableName = "LoopTests2.xctest"
BlueprintName = "LoopTests2"
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43E2D8FC1D20C508004DA55F"
BuildableName = "LoopTests2.xctest"
BlueprintName = "LoopTests2"
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down
10 changes: 10 additions & 0 deletions Loop.xcodeproj/xcshareddata/xcschemes/WatchApp.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "43E2D8FC1D20C508004DA55F"
BuildableName = "LoopTests2.xctest"
BlueprintName = "LoopTests2"
ReferencedContainer = "container:Loop.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
Expand Down
4 changes: 2 additions & 2 deletions Loop/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

NotificationManager.authorize()

AnalyticsManager.application(application, didFinishLaunchingWithOptions: launchOptions)
AnalyticsManager.sharedManager.application(application, didFinishLaunchingWithOptions: launchOptions)

return true
}
Expand Down Expand Up @@ -71,7 +71,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
startDate = notification.userInfo?[NotificationManager.UserInfoKey.BolusStartDate.rawValue] as? NSDate where
startDate.timeIntervalSinceNow >= NSTimeInterval(minutes: -5)
{
AnalyticsManager.didRetryBolus()
AnalyticsManager.sharedManager.didRetryBolus()

DeviceDataManager.sharedManager.enactBolus(units) { (error) in
if error != nil {
Expand Down
Loading