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
2 changes: 2 additions & 0 deletions Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1742,6 +1742,7 @@
43A943961B926B7B0051FA24 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
Expand All @@ -1759,6 +1760,7 @@
43A943971B926B7B0051FA24 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"tintColor" : {
"green" : 0.5843138,
"red" : 1,
"alpha" : 1,
"blue" : 0
},
"class" : "CLKComplicationTemplateUtilitarianLargeFlat",
"textProvider" : {
"textProviders" : [
{
"shortText" : "120",
"class" : "CLKLocalizableSimpleTextProvider",
"text" : "120↘︎"
},
{
"class" : "CLKLocalizableSimpleTextProvider",
"text" : "75"
},
{
"class" : "CLKRelativeDateTextProvider",
"relativeDateStyle" : 0,
"calendarUnits" : 64,
"date" : 509858751.802992
}
],
"class" : "CLKLocalizableCompoundTextProvider",
"formatKey" : "UtilitarianLargeFlat"
},
"version" : 30000
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"tintColor" : {
"green" : 0.5843138,
"red" : 1,
"alpha" : 1,
"blue" : 0
},
"class" : "CLKComplicationTemplateUtilitarianSmallFlat",
"textProvider" : {
"textProviders" : [
{
"shortText" : "120",
"class" : "CLKLocalizableSimpleTextProvider",
"text" : "120↘︎"
},
{
"class" : "CLKRelativeDateTextProvider",
"relativeDateStyle" : 0,
"calendarUnits" : 64,
"date" : 509858751.808347
}
],
"class" : "CLKLocalizableCompoundTextProvider",
"formatKey" : "UtilitarianSmallFlat"
},
"version" : 30000
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"tintColor" : {
"green" : 0.5843138,
"red" : 1,
"alpha" : 1,
"blue" : 0
},
"class" : "CLKComplicationTemplateModularLargeTallBody",
"bodyTextProvider" : {
"shortText" : "120",
"class" : "CLKLocalizableSimpleTextProvider",
"text" : "120↘︎"
},
"version" : 30000,
"headerTextProvider" : {
"class" : "CLKRelativeDateTextProvider",
"relativeDateStyle" : 0,
"calendarUnits" : 64,
"date" : 509858751.805835
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"tintColor" : {
"green" : 0.5843138,
"red" : 1,
"alpha" : 1,
"blue" : 0
},
"class" : "CLKComplicationTemplateCircularSmallSimpleText",
"textProvider" : {
"shortText" : "120",
"class" : "CLKLocalizableSimpleTextProvider",
"text" : "120↘︎"
},
"version" : 30000
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"tintColor" : {
"green" : 0.5843138,
"red" : 1,
"alpha" : 1,
"blue" : 0
},
"class" : "CLKComplicationTemplateModularSmallStackText",
"highlightLine2" : false,
"line2TextProvider" : {
"class" : "CLKRelativeDateTextProvider",
"relativeDateStyle" : 0,
"calendarUnits" : 64,
"date" : 509858751.798859
},
"version" : 30000,
"line1TextProvider" : {
"shortText" : "120",
"class" : "CLKLocalizableSimpleTextProvider",
"text" : "120↘︎"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"tintColor" : {
"green" : 0.5843138,
"red" : 1,
"alpha" : 1,
"blue" : 0
},
"class" : "CLKComplicationTemplateUtilitarianSmallFlat",
"textProvider" : {
"textProviders" : [
{
"shortText" : "120",
"class" : "CLKLocalizableSimpleTextProvider",
"text" : "120↘︎"
},
{
"class" : "CLKRelativeDateTextProvider",
"relativeDateStyle" : 0,
"calendarUnits" : 64,
"date" : 509858751.8126
}
],
"class" : "CLKLocalizableCompoundTextProvider",
"formatKey" : "UtilitarianSmallFlat"
},
"version" : 30000
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"tintColor" : {
"green" : 0.5843138,
"red" : 1,
"alpha" : 1,
"blue" : 0
},
"class" : "CLKComplicationTemplateExtraLargeStackText",
"highlightLine2" : false,
"line2TextProvider" : {
"class" : "CLKRelativeDateTextProvider",
"relativeDateStyle" : 0,
"calendarUnits" : 64,
"date" : 509858751.81526
},
"version" : 30000,
"line1TextProvider" : {
"shortText" : "120",
"class" : "CLKLocalizableSimpleTextProvider",
"text" : "120↘︎"
}
}
6 changes: 3 additions & 3 deletions Loop/gallery.ckcomplication/Base.lproj/ckcomplication.strings
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"120↘︎" = "120↘︎";

/* Utilitarian small flat format string (1: Glucose & Trend symbol) (2: Time) */
"UtilitarianSmallFlat" = "%1@ %2@";
"UtilitarianSmallFlat" = "%@ %@";

/* Utilitarian small flat format string (1: Glucose & Trend symbol) (2: Eventual Glucose) (3: Time) */
"UtilitarianLargeFlat" = "%1@%2@ %3@";
/* Utilitarian large flat format string (1: Glucose & Trend symbol) (2: Eventual Glucose) (3: Time) */
"UtilitarianLargeFlat" = "%@%@ %@";
15 changes: 8 additions & 7 deletions Loop/gallery.ckcomplication/complicationManifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"supported complication families" : {
"3" : "7F209C4B-314F-4875-9072-3CFD6C18AE3A.json",
"1" : "0912322A-F7BA-487C-B910-60ADD3B22910.json",
"6" : "E5D4D16F-B048-454F-BAD4-A1D92E65F650.json",
"4" : "2F588D19-9780-4727-B5CB-DFE7945469E4.json",
"0" : "2A9C2659-183D-468D-A20D-704A6D9F7875.json",
"7" : "1163D5A6-1BB9-41D4-B6A0-60DCDFD52EC3.json"
"7" : "B1F1D9E8-541F-414D-AF5D-780D6B993FD9.json",
"3" : "28F6F412-3A28-4CF6-A184-F6345627D8C8.json",
"4" : "50FD3B5F-03E3-486D-A506-21DC4A3B4857.json",
"0" : "5506FC7B-C7BA-439A-8075-7B1C5DE1114A.json",
"1" : "3902026C-B841-4642-AD7B-1CA80FAC447D.json",
"6" : "30ACFC76-BFF3-4761-9345-5C169460F920.json",
"2" : "7F6C7226-52B7-406D-ACD2-7AB92587CBB4.json"
},
"client ID" : "com.loopkit.Loop.watchkitapp.watchkitextension"
"client ID" : "com.loudnate.Loop.watchkitapp.watchkitextension"
}
13 changes: 13 additions & 0 deletions Loop/gallery.ckcomplication/it.lproj/ckcomplication.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
ckcomplication.strings
Loop

Created by Nate Racklyeft on 9/18/16.
Copyright © 2016 Nathan Racklyeft. All rights reserved.
*/

/* The complication template example glucose & trend */
"120↘︎" = "6.7↘︎";

/* The complication template example eventual glucose */
"75" = "3.0";
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : "<=145"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : ">145"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"assets" : [
{
"idiom" : "watch",
"filename" : "Circular.imageset",
"role" : "circular"
},
{
"idiom" : "watch",
"filename" : "Extra Large.imageset",
"role" : "extra-large"
},
{
"idiom" : "watch",
"filename" : "Modular.imageset",
"role" : "modular"
},
{
"idiom" : "watch",
"filename" : "Utilitarian.imageset",
"role" : "utilitarian"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : "<=145"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : ">145"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : "<=145"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : ">145"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"images" : [
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : "<=145"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : ">145"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
6 changes: 3 additions & 3 deletions WatchApp Extension/Base.lproj/ckcomplication.strings
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"120↘︎" = "120↘︎";

/* Utilitarian small flat format string (1: Glucose & Trend symbol) (2: Time) */
"UtilitarianSmallFlat" = "%1@ %2@";
"UtilitarianSmallFlat" = "%@ %@";

/* Utilitarian small flat format string (1: Glucose & Trend symbol) (2: Eventual Glucose) (3: Time) */
"UtilitarianLargeFlat" = "%1@%2@ %3@";
/* Utilitarian large flat format string (1: Glucose & Trend symbol) (2: Eventual Glucose) (3: Time) */
"UtilitarianLargeFlat" = "%@%@ %@";
4 changes: 1 addition & 3 deletions WatchApp Extension/ComplicationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ final class ComplicationController: NSObject, CLKComplicationDataSource {
extraLarge.line1TextProvider = glucoseText
extraLarge.line2TextProvider = timeText
template = extraLarge
case .utilitarianSmallFlat:
case .utilitarianSmall, .utilitarianSmallFlat:
let utilitarianSmallFlat = CLKComplicationTemplateUtilitarianSmallFlat()
utilitarianSmallFlat.textProvider = CLKSimpleTextProvider.localizableTextProvider(withStringsFileFormatKey: "UtilitarianSmallFlat", textProviders: [glucoseText, timeText])
template = utilitarianSmallFlat
Expand All @@ -112,8 +112,6 @@ final class ComplicationController: NSObject, CLKComplicationDataSource {
let eventualGlucoseText = CLKSimpleTextProvider.localizableTextProvider(withStringsFileTextKey: "75")
utilitarianLarge.textProvider = CLKSimpleTextProvider.localizableTextProvider(withStringsFileFormatKey: "UtilitarianLargeFlat", textProviders: [glucoseText, eventualGlucoseText, timeText])
template = utilitarianLarge
default:
template = nil
}

template?.tintColor = UIColor.tintColor
Expand Down
Loading