Skip to content

Commit

Permalink
Apple Watch Series 4 complications (#848)
Browse files Browse the repository at this point in the history
* Series 4 complications draft

* Remove development team changes

* Fix accidental reversions

* Series 4 complication support

* Fixes per @ps2

* Revert development team change
  • Loading branch information
mpangburn authored and ps2 committed Jan 11, 2019
1 parent 472e739 commit d0f2611
Show file tree
Hide file tree
Showing 15 changed files with 718 additions and 259 deletions.
41 changes: 40 additions & 1 deletion Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@
7D7076631FE06EE4004AC8EA /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7D7076651FE06EE4004AC8EA /* Localizable.strings */; };
7D7076681FE0702F004AC8EA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7D70766A1FE0702F004AC8EA /* InfoPlist.strings */; };
894F71E21FFEC4D8007D365C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 894F71E11FFEC4D8007D365C /* Assets.xcassets */; };
898ECA60218ABD17001E9D35 /* GlucoseChartScaler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898ECA5E218ABD17001E9D35 /* GlucoseChartScaler.swift */; };
898ECA61218ABD17001E9D35 /* GlucoseChartData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898ECA5F218ABD17001E9D35 /* GlucoseChartData.swift */; };
898ECA63218ABD21001E9D35 /* ComplicationChartManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898ECA62218ABD21001E9D35 /* ComplicationChartManager.swift */; };
898ECA65218ABD9B001E9D35 /* CGRect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898ECA64218ABD9A001E9D35 /* CGRect.swift */; };
898ECA69218ABDA9001E9D35 /* CLKTextProvider+Compound.m in Sources */ = {isa = PBXBuildFile; fileRef = 898ECA67218ABDA8001E9D35 /* CLKTextProvider+Compound.m */; };
C10428971D17BAD400DD539A /* NightscoutUploadKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C10428961D17BAD400DD539A /* NightscoutUploadKit.framework */; };
C10B28461EA9BA5E006EA1FC /* far_future_high_bg_forecast.json in Resources */ = {isa = PBXBuildFile; fileRef = C10B28451EA9BA5E006EA1FC /* far_future_high_bg_forecast.json */; };
C11C87DE1E21EAAD00BB71D3 /* HKUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F526D5E1DF2459000A04910 /* HKUnit.swift */; };
Expand Down Expand Up @@ -823,6 +828,13 @@
7DD382781F8DBFC60071272B /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/MainInterface.strings; sourceTree = "<group>"; };
7DD382791F8DBFC60071272B /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Interface.strings; sourceTree = "<group>"; };
894F71E11FFEC4D8007D365C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
898ECA5E218ABD17001E9D35 /* GlucoseChartScaler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlucoseChartScaler.swift; sourceTree = "<group>"; };
898ECA5F218ABD17001E9D35 /* GlucoseChartData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlucoseChartData.swift; sourceTree = "<group>"; };
898ECA62218ABD21001E9D35 /* ComplicationChartManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComplicationChartManager.swift; sourceTree = "<group>"; };
898ECA64218ABD9A001E9D35 /* CGRect.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGRect.swift; sourceTree = "<group>"; };
898ECA66218ABDA8001E9D35 /* WatchApp Extension-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WatchApp Extension-Bridging-Header.h"; sourceTree = "<group>"; };
898ECA67218ABDA8001E9D35 /* CLKTextProvider+Compound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CLKTextProvider+Compound.m"; sourceTree = "<group>"; };
898ECA68218ABDA9001E9D35 /* CLKTextProvider+Compound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CLKTextProvider+Compound.h"; sourceTree = "<group>"; };
C10428961D17BAD400DD539A /* NightscoutUploadKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NightscoutUploadKit.framework; path = Carthage/Build/iOS/NightscoutUploadKit.framework; sourceTree = SOURCE_ROOT; };
C10B28451EA9BA5E006EA1FC /* far_future_high_bg_forecast.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = far_future_high_bg_forecast.json; sourceTree = "<group>"; };
C12F21A61DFA79CB00748193 /* recommend_temp_basal_very_low_end_in_range.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = recommend_temp_basal_very_low_end_in_range.json; sourceTree = "<group>"; };
Expand Down Expand Up @@ -933,7 +945,10 @@
isa = PBXGroup;
children = (
4344629120A7C19800C4BE6F /* ButtonGroup.swift */,
898ECA64218ABD9A001E9D35 /* CGRect.swift */,
4328E0221CFBE2C500E199AA /* CLKComplicationTemplate.swift */,
898ECA68218ABDA9001E9D35 /* CLKTextProvider+Compound.h */,
898ECA67218ABDA8001E9D35 /* CLKTextProvider+Compound.m */,
4F7E8AC420E2AB9600AEA65E /* Date.swift */,
4F73F5FB20E2E7FA00E8D82C /* GlucoseStore.swift */,
4328E0201CFBE2C500E199AA /* IdentifiableClass.swift */,
Expand All @@ -944,6 +959,7 @@
43CB2B2A1D924D450079823D /* WCSession.swift */,
4328E0251CFBE2C500E199AA /* WKAlertAction.swift */,
4328E02E1CFBF81800E199AA /* WKInterfaceImage.swift */,
898ECA66218ABDA8001E9D35 /* WatchApp Extension-Bridging-Header.h */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -1065,6 +1081,7 @@
4328E01F1CFBE2B100E199AA /* Extensions */,
4FE3475F20D5D7FA00A86D03 /* Managers */,
4F75F0052100146B00B5570E /* Scenes */,
898ECA5D218ABD17001E9D35 /* Models */,
43A943831B926B7B0051FA24 /* Supporting Files */,
);
path = "WatchApp Extension";
Expand Down Expand Up @@ -1304,6 +1321,7 @@
isa = PBXGroup;
children = (
4FDDD23620DC51DF00D04B16 /* LoopDataManager.swift */,
898ECA62218ABD21001E9D35 /* ComplicationChartManager.swift */,
);
path = Managers;
sourceTree = "<group>";
Expand Down Expand Up @@ -1370,6 +1388,15 @@
path = Common;
sourceTree = "<group>";
};
898ECA5D218ABD17001E9D35 /* Models */ = {
isa = PBXGroup;
children = (
898ECA5E218ABD17001E9D35 /* GlucoseChartScaler.swift */,
898ECA5F218ABD17001E9D35 /* GlucoseChartData.swift */,
);
path = Models;
sourceTree = "<group>";
};
968DCD53F724DE56FFE51920 /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1598,7 +1625,7 @@
};
43A9437D1B926B7B0051FA24 = {
CreatedOnToolsVersion = 7.0;
LastSwiftMigration = 0800;
LastSwiftMigration = 1000;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
enabled = 0;
Expand Down Expand Up @@ -1966,6 +1993,7 @@
4FF4D1011E18375000846527 /* WatchContext.swift in Sources */,
435400311C9F744E00D5819C /* BolusSuggestionUserInfo.swift in Sources */,
4372E49A213F7A830068E043 /* WalshInsulinModel.swift in Sources */,
898ECA63218ABD21001E9D35 /* ComplicationChartManager.swift in Sources */,
43A9438A1B926B7B0051FA24 /* NotificationController.swift in Sources */,
439A7945211FE23A0041B75F /* NSUserActivity.swift in Sources */,
43A943881B926B7B0051FA24 /* ExtensionDelegate.swift in Sources */,
Expand All @@ -1974,10 +2002,12 @@
4328E02F1CFBF81800E199AA /* WKInterfaceImage.swift in Sources */,
4F2C15811E0495B200E160D4 /* WatchContext+WatchApp.swift in Sources */,
4372E496213DCDD30068E043 /* GlucoseChartValueHashable.swift in Sources */,
898ECA61218ABD17001E9D35 /* GlucoseChartData.swift in Sources */,
4344629820A8B2D700C4BE6F /* OSLog.swift in Sources */,
4328E02A1CFBE2C500E199AA /* UIColor.swift in Sources */,
4372E484213A63FB0068E043 /* ChartHUDController.swift in Sources */,
4FDDD23720DC51DF00D04B16 /* LoopDataManager.swift in Sources */,
898ECA60218ABD17001E9D35 /* GlucoseChartScaler.swift in Sources */,
4328E01B1CFBE1DA00E199AA /* BolusInterfaceController.swift in Sources */,
4F82655020E69F9A0031A8F5 /* HUDInterfaceController.swift in Sources */,
4372E492213D956C0068E043 /* GlucoseRangeSchedule.swift in Sources */,
Expand All @@ -1994,9 +2024,11 @@
432CF87520D8AC950066B889 /* NSUserDefaults+WatchApp.swift in Sources */,
43027F0F1DFE0EC900C51989 /* HKUnit.swift in Sources */,
4344629220A7C19800C4BE6F /* ButtonGroup.swift in Sources */,
898ECA69218ABDA9001E9D35 /* CLKTextProvider+Compound.m in Sources */,
4372E48C213CB6750068E043 /* Double.swift in Sources */,
43785E972120E4500057DED1 /* INRelevantShortcutStore+Loop.swift in Sources */,
4372E48E213CF8AD0068E043 /* LoopSettings.swift in Sources */,
898ECA65218ABD9B001E9D35 /* CGRect.swift in Sources */,
4372E49B213F7B340068E043 /* NSBundle.swift in Sources */,
43CB2B2B1D924D450079823D /* WCSession.swift in Sources */,
4372E497213F79F90068E043 /* NSUserDefaults.swift in Sources */,
Expand Down Expand Up @@ -2645,6 +2677,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "WatchApp Extension/WatchApp Extension.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
Expand All @@ -2657,6 +2690,9 @@
PROVISIONING_PROFILE = "";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "WatchApp Extension/Extensions/WatchApp Extension-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
};
name = Debug;
Expand All @@ -2665,6 +2701,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = "WatchApp Extension/WatchApp Extension.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
Expand All @@ -2677,6 +2714,8 @@
PROVISIONING_PROFILE = "";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "WatchApp Extension/Extensions/WatchApp Extension-Bridging-Header.h";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = 4;
};
name = Release;
Expand Down
9 changes: 9 additions & 0 deletions WatchApp Extension/Base.lproj/ckcomplication.strings
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,14 @@
Copyright © 2016 Nathan Racklyeft. All rights reserved.
*/

/* The complication template example glucose and trend string */
"120↘︎" = "120↘︎";

/* The complication template example glucose string */
"120" = "120";

/* The complication template example time string */
"3MIN" = "3MIN";

/* Utilitarian large flat format string (1: Glucose & Trend symbol) (2: Eventual Glucose) (3: Time) */
"UtilitarianLargeFlat" = "%@%@ %@";
Loading

0 comments on commit d0f2611

Please sign in to comment.