diff --git a/Cartfile b/Cartfile
index 17e1ca9dc5..55c17b5336 100644
--- a/Cartfile
+++ b/Cartfile
@@ -1,7 +1,7 @@
-github "LoopKit/LoopKit" == 2.1.3
+github "LoopKit/LoopKit" == 2.1.5
github "LoopKit/CGMBLEKit" == 2.1.1
github "i-schuetz/SwiftCharts" == 0.6.2
github "mddub/dexcom-share-client-swift" == 0.4.1
github "mddub/G4ShareSpy" == 0.3.3
-github "ps2/rileylink_ios" == 2.0.6
+github "ps2/rileylink_ios" == 2.0.7
github "LoopKit/Amplitude-iOS" "decreepify"
diff --git a/Cartfile.resolved b/Cartfile.resolved
index 0071486027..21812dd5c7 100644
--- a/Cartfile.resolved
+++ b/Cartfile.resolved
@@ -1,7 +1,7 @@
github "LoopKit/Amplitude-iOS" "2137d5fd44bf630ed33e1e72d7af6d8f8612f270"
github "LoopKit/CGMBLEKit" "v2.1.1"
-github "LoopKit/LoopKit" "v2.1.3"
+github "LoopKit/LoopKit" "v2.1.5"
github "i-schuetz/SwiftCharts" "0.6.2"
github "mddub/G4ShareSpy" "v0.3.3"
github "mddub/dexcom-share-client-swift" "v0.4.1"
-github "ps2/rileylink_ios" "v2.0.6"
+github "ps2/rileylink_ios" "v2.0.7"
diff --git a/DoseMathTests/Info.plist b/DoseMathTests/Info.plist
index 4507c55102..d4152c96a0 100644
--- a/DoseMathTests/Info.plist
+++ b/DoseMathTests/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.9.2
+ 1.9.3
CFBundleSignature
????
CFBundleVersion
diff --git a/Loop Status Extension/Info.plist b/Loop Status Extension/Info.plist
index 0e43389ef6..613009f16d 100644
--- a/Loop Status Extension/Info.plist
+++ b/Loop Status Extension/Info.plist
@@ -19,7 +19,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 1.9.2
+ 1.9.3
CFBundleVersion
$(CURRENT_PROJECT_VERSION)
AppGroupIdentifier
diff --git a/Loop.xcodeproj/project.pbxproj b/Loop.xcodeproj/project.pbxproj
index 3365a8388a..4f7d8df250 100644
--- a/Loop.xcodeproj/project.pbxproj
+++ b/Loop.xcodeproj/project.pbxproj
@@ -2442,7 +2442,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: loudnate@gmail.com (XZN842LDLT)";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 53;
+ CURRENT_PROJECT_VERSION = 54;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -2514,7 +2514,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: loudnate@gmail.com (XZN842LDLT)";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 53;
+ CURRENT_PROJECT_VERSION = 54;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -2765,11 +2765,11 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
- CURRENT_PROJECT_VERSION = 53;
+ CURRENT_PROJECT_VERSION = 54;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 53;
+ DYLIB_CURRENT_VERSION = 54;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = LoopUI/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
@@ -2792,11 +2792,11 @@
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
- CURRENT_PROJECT_VERSION = 53;
+ CURRENT_PROJECT_VERSION = 54;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 53;
+ DYLIB_CURRENT_VERSION = 54;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = LoopUI/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
diff --git a/Loop/Info.plist b/Loop/Info.plist
index e5951d83e9..51de45c8dc 100644
--- a/Loop/Info.plist
+++ b/Loop/Info.plist
@@ -19,7 +19,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.9.2
+ 1.9.3
CFBundleSignature
????
CFBundleURLTypes
diff --git a/LoopTests/Info.plist b/LoopTests/Info.plist
index 4507c55102..d4152c96a0 100644
--- a/LoopTests/Info.plist
+++ b/LoopTests/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.9.2
+ 1.9.3
CFBundleSignature
????
CFBundleVersion
diff --git a/LoopUI/Info.plist b/LoopUI/Info.plist
index ead3c07674..8ac931c440 100644
--- a/LoopUI/Info.plist
+++ b/LoopUI/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 1.9.2
+ 1.9.3
CFBundleVersion
$(CURRENT_PROJECT_VERSION)
NSPrincipalClass
diff --git a/WatchApp Extension/ComplicationController.swift b/WatchApp Extension/ComplicationController.swift
index 4b149cabb1..d632954571 100644
--- a/WatchApp Extension/ComplicationController.swift
+++ b/WatchApp Extension/ComplicationController.swift
@@ -92,7 +92,30 @@ final class ComplicationController: NSObject, CLKComplicationDataSource {
let timeText = CLKRelativeDateTextProvider(date: Date(), style: .natural, units: .minute)
switch complication.family {
- case .graphicCorner, .graphicCircular, .graphicRectangular, .graphicBezel:
+
+ case .graphicCorner:
+ if #available(watchOSApplicationExtension 5.0, *) {
+ let cornerTemplate = CLKComplicationTemplateGraphicCornerStackText()
+ cornerTemplate.outerTextProvider = glucoseText
+ cornerTemplate.innerTextProvider = timeText
+ cornerTemplate.outerTextProvider.tintColor = .green
+ template = cornerTemplate
+ } else {
+ // Fallback on earlier versions
+ template = nil
+ }
+ case .graphicCircular:
+ if #available(watchOSApplicationExtension 5.0, *) {
+ let circularTemplate = CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText()
+ circularTemplate.gaugeProvider = CLKSimpleGaugeProvider(style: .fill, gaugeColor: .green, fillFraction: 1)
+ circularTemplate.centerTextProvider = CLKSimpleTextProvider(text: "120")
+ circularTemplate.bottomTextProvider = CLKSimpleTextProvider(text: "↘︎")
+ template = circularTemplate
+ } else {
+ // Fallback on earlier versions
+ template = nil
+ }
+ case .graphicRectangular, .graphicBezel:
template = nil
case .modularSmall:
let modularSmall = CLKComplicationTemplateModularSmallStackText()
@@ -126,5 +149,6 @@ final class ComplicationController: NSObject, CLKComplicationDataSource {
template?.tintColor = UIColor.tintColor
handler(template)
+
}
}
diff --git a/WatchApp Extension/Extensions/CLKComplicationTemplate.swift b/WatchApp Extension/Extensions/CLKComplicationTemplate.swift
index 1a3e54331f..758a643f2d 100644
--- a/WatchApp Extension/Extensions/CLKComplicationTemplate.swift
+++ b/WatchApp Extension/Extensions/CLKComplicationTemplate.swift
@@ -46,8 +46,45 @@ extension CLKComplicationTemplate {
timeFormatter.dateStyle = .none
timeFormatter.timeStyle = .short
+
switch family {
- case .graphicCorner, .graphicCircular, .graphicRectangular, .graphicBezel:
+ case .graphicCorner:
+ // ***************************************
+ // ** Apple Watch Series 4 Complication **
+ // ***************************************
+ // Corner Text
+ // Outer Text: Current Glucose and Trend
+ // Inner Text: timeText
+
+ if #available(watchOSApplicationExtension 5.0, *) {
+ let cornerTemplate = CLKComplicationTemplateGraphicCornerStackText()
+ cornerTemplate.outerTextProvider = glucoseAndTrendText
+ cornerTemplate.outerTextProvider.tintColor = .green
+ cornerTemplate.innerTextProvider = timeText
+ return cornerTemplate
+ } else {
+ // Fallback on earlier versions
+ return nil
+ }
+ case .graphicCircular:
+ // ***************************************
+ // ** Apple Watch Series 4 Complication **
+ // ***************************************
+ // Circular Gauge
+ // Full Ring
+ // Current Glucose in Center, Trend Arrow Below
+ // * future enhancement - update gauge colors to reflect loop status, or time in range for the day
+ if #available(watchOSApplicationExtension 5.0, *) {
+ let circularTemplate = CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText()
+ circularTemplate.gaugeProvider = CLKSimpleGaugeProvider(style: .fill, gaugeColor: .green, fillFraction: 1)
+ circularTemplate.centerTextProvider = CLKSimpleTextProvider(text: glucoseString)
+ circularTemplate.bottomTextProvider = CLKSimpleTextProvider(text: (trend?.symbol ?? " "))
+ return circularTemplate
+ } else {
+ // Fallback on earlier versions
+ return nil
+ }
+ case .graphicRectangular, .graphicBezel:
return nil
case .modularSmall:
let template = CLKComplicationTemplateModularSmallStackText()
diff --git a/WatchApp Extension/Info.plist b/WatchApp Extension/Info.plist
index 44c9ce1e78..d9ff34f6f8 100644
--- a/WatchApp Extension/Info.plist
+++ b/WatchApp Extension/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
XPC!
CFBundleShortVersionString
- 1.9.2
+ 1.9.3
CFBundleSignature
????
CFBundleVersion
@@ -26,13 +26,17 @@
$(PRODUCT_MODULE_NAME).ComplicationController
CLKComplicationSupportedFamilies
- CLKComplicationFamilyModularSmall
CLKComplicationFamilyCircularSmall
CLKComplicationFamilyExtraLarge
- CLKComplicationFamilyUtilitarianSmallFlat
- CLKComplicationFamilyUtilitarianLarge
+ CLKComplicationFamilyGraphicBezel
+ CLKComplicationFamilyGraphicCircular
+ CLKComplicationFamilyGraphicCorner
+ CLKComplicationFamilyGraphicRectangular
CLKComplicationFamilyModularLarge
+ CLKComplicationFamilyModularSmall
+ CLKComplicationFamilyUtilitarianLarge
CLKComplicationFamilyUtilitarianSmall
+ CLKComplicationFamilyUtilitarianSmallFlat
NSExtension
diff --git a/WatchApp/Info.plist b/WatchApp/Info.plist
index 6817e1d304..750ca80dd6 100644
--- a/WatchApp/Info.plist
+++ b/WatchApp/Info.plist
@@ -17,7 +17,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.9.2
+ 1.9.3
CFBundleSignature
????
CFBundleVersion