Skip to content
Closed
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
4 changes: 2 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -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"
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" "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"
2 changes: 1 addition & 1 deletion DoseMathTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.9.2</string>
<string>1.9.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion Loop Status Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.9.2</string>
<string>1.9.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>AppGroupIdentifier</key>
Expand Down
12 changes: 6 additions & 6 deletions Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: [email protected] (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;
Expand Down Expand Up @@ -2514,7 +2514,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer: [email protected] (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;
Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion Loop/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.9.2</string>
<string>1.9.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 1 addition & 1 deletion LoopTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.9.2</string>
<string>1.9.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion LoopUI/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.9.2</string>
<string>1.9.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
26 changes: 25 additions & 1 deletion WatchApp Extension/ComplicationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -126,5 +149,6 @@ final class ComplicationController: NSObject, CLKComplicationDataSource {

template?.tintColor = UIColor.tintColor
handler(template)

}
}
39 changes: 38 additions & 1 deletion WatchApp Extension/Extensions/CLKComplicationTemplate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
12 changes: 8 additions & 4 deletions WatchApp Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.9.2</string>
<string>1.9.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand All @@ -26,13 +26,17 @@
<string>$(PRODUCT_MODULE_NAME).ComplicationController</string>
<key>CLKComplicationSupportedFamilies</key>
<array>
<string>CLKComplicationFamilyModularSmall</string>
<string>CLKComplicationFamilyCircularSmall</string>
<string>CLKComplicationFamilyExtraLarge</string>
<string>CLKComplicationFamilyUtilitarianSmallFlat</string>
<string>CLKComplicationFamilyUtilitarianLarge</string>
<string>CLKComplicationFamilyGraphicBezel</string>
<string>CLKComplicationFamilyGraphicCircular</string>
<string>CLKComplicationFamilyGraphicCorner</string>
<string>CLKComplicationFamilyGraphicRectangular</string>
<string>CLKComplicationFamilyModularLarge</string>
<string>CLKComplicationFamilyModularSmall</string>
<string>CLKComplicationFamilyUtilitarianLarge</string>
<string>CLKComplicationFamilyUtilitarianSmall</string>
<string>CLKComplicationFamilyUtilitarianSmallFlat</string>
</array>
<key>NSExtension</key>
<dict>
Expand Down
2 changes: 1 addition & 1 deletion WatchApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.9.2</string>
<string>1.9.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down