#198: Lockscreen Widget and new optimized Watch complications
This commit is contained in:
parent
cb999f67c5
commit
aa00c2bde9
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="19162" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="zZT-1m-QPq">
|
||||
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="21225" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="zZT-1m-QPq">
|
||||
<device id="watch44"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="19044"/>
|
||||
<deployment identifier="watchOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="21040"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Main Controller-->
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>779</string>
|
||||
<string>785</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,26 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
|
|||
handler([])
|
||||
}
|
||||
|
||||
fileprivate func createLine1And2TextProvider(_ currentNightscoutData: NightscoutData) -> (CLKTextProvider, CLKTextProvider) {
|
||||
|
||||
var line1TextProvider : CLKTextProvider
|
||||
var line2TextProvider : CLKTextProvider
|
||||
|
||||
if useRelativeTimeWhenPossible {
|
||||
line1TextProvider = CLKSimpleTextProvider(text: getSgvAndArrow(currentNightscoutData, " "))
|
||||
line1TextProvider.tintColor = UIColorChanger.getBgColor(
|
||||
UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))
|
||||
line2TextProvider = getRelativeDateTextProvider(for: currentNightscoutData.time)
|
||||
} else {
|
||||
line1TextProvider = CLKSimpleTextProvider(text: "\(currentNightscoutData.hourAndMinutes)")
|
||||
line1TextProvider.tintColor = UIColorChanger.getBgColor(
|
||||
UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))
|
||||
line2TextProvider = CLKSimpleTextProvider(text: "\(UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))\(currentNightscoutData.bgdeltaString)\(currentNightscoutData.bgdeltaArrow)")
|
||||
}
|
||||
|
||||
return (line1TextProvider, line2TextProvider)
|
||||
}
|
||||
|
||||
func getCurrentTimelineEntry(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineEntry?) -> Void) {
|
||||
|
||||
let currentNightscoutData = NightscoutCacheService.singleton.getCurrentNightscoutData()
|
||||
|
@ -40,19 +60,7 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
|
|||
switch complication.family {
|
||||
case .modularSmall:
|
||||
|
||||
var line1TextProvider : CLKTextProvider
|
||||
var line2TextProvider : CLKTextProvider
|
||||
if useRelativeTimeWhenPossible {
|
||||
line1TextProvider = CLKSimpleTextProvider(text: getSgvAndArrow(currentNightscoutData, " "))
|
||||
line1TextProvider.tintColor = UIColorChanger.getBgColor(
|
||||
UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))
|
||||
line2TextProvider = getRelativeDateTextProvider(for: currentNightscoutData.time)
|
||||
} else {
|
||||
line1TextProvider = CLKSimpleTextProvider(text: "\(currentNightscoutData.hourAndMinutes)")
|
||||
line1TextProvider.tintColor = UIColorChanger.getBgColor(
|
||||
UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))
|
||||
line2TextProvider = CLKSimpleTextProvider(text: "\(UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))\(currentNightscoutData.bgdeltaString)\(currentNightscoutData.bgdeltaArrow)")
|
||||
}
|
||||
let (line1TextProvider, line2TextProvider) = createLine1And2TextProvider(currentNightscoutData)
|
||||
let modTemplate = CLKComplicationTemplateModularSmallStackText(line1TextProvider: line1TextProvider,
|
||||
line2TextProvider: line2TextProvider)
|
||||
template = modTemplate
|
||||
|
@ -110,6 +118,23 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
|
|||
textProvider.tintColor = UIColorChanger.getBgColor(
|
||||
UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))
|
||||
template = CLKComplicationTemplateUtilitarianLargeFlat(textProvider: textProvider, imageProvider: imageProvider)
|
||||
case .extraLarge:
|
||||
let row1Col1 = CLKSimpleTextProvider(text: getOneLine(currentNightscoutData))
|
||||
row1Col1.tintColor = UIColorChanger.getBgColor(
|
||||
UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))
|
||||
let row1Col2 = getRelativeDateTextProvider(for: currentNightscoutData.time)
|
||||
var row2Col1 = CLKSimpleTextProvider(text: "")
|
||||
var row2Col2 = CLKSimpleTextProvider(text: "")
|
||||
if self.oldNightscoutData.count > 1 {
|
||||
let nightscoutData = self.oldNightscoutData[1]
|
||||
row2Col1 = CLKSimpleTextProvider(text: getOneLine(nightscoutData))
|
||||
row2Col2 = getRelativeDateTextProvider(for: nightscoutData.time) as? CLKSimpleTextProvider ?? row2Col2
|
||||
}
|
||||
|
||||
template = CLKComplicationTemplateExtraLargeColumnsText(
|
||||
row1Column1TextProvider: row1Col1, row1Column2TextProvider: row1Col2,
|
||||
row2Column1TextProvider: row2Col1, row2Column2TextProvider: row2Col2)
|
||||
|
||||
case .circularSmall:
|
||||
|
||||
let textProvider = CLKSimpleTextProvider(text:
|
||||
|
@ -136,13 +161,15 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
|
|||
case .graphicCircular:
|
||||
if #available(watchOSApplicationExtension 5.0, *) {
|
||||
|
||||
let sgvLong = "\(UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))"
|
||||
let sgvShort = "\(UnitsConverter.mgdlToShortDisplayUnits(currentNightscoutData.sgv))"
|
||||
let centerTextProvider = CLKSimpleTextProvider(text: sgvLong, shortText: sgvShort)
|
||||
centerTextProvider.tintColor = UIColorChanger.getBgColor(
|
||||
let line2TextProvider = CLKSimpleTextProvider(text: "\(UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))")
|
||||
line2TextProvider.tintColor = UIColorChanger.getBgColor(
|
||||
UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))
|
||||
let gaugeProvider = CLKSimpleGaugeProvider(style: .fill, gaugeColor: UIColor.black, fillFraction: CLKSimpleGaugeProviderFillFractionEmpty)
|
||||
template = CLKComplicationTemplateGraphicCircularClosedGaugeText(gaugeProvider: gaugeProvider, centerTextProvider: centerTextProvider)
|
||||
|
||||
let line1TextProvider = CLKSimpleTextProvider(text: "\(currentNightscoutData.hourAndMinutes)")
|
||||
line1TextProvider.tintColor = UIColorChanger.getBgColor(
|
||||
UnitsConverter.mgdlToDisplayUnits(currentNightscoutData.sgv))
|
||||
|
||||
template = CLKComplicationTemplateGraphicCircularStackText(line1TextProvider: line1TextProvider, line2TextProvider: line2TextProvider)
|
||||
} else {
|
||||
abort()
|
||||
}
|
||||
|
@ -157,6 +184,14 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
|
|||
} else {
|
||||
abort()
|
||||
}
|
||||
case .graphicExtraLarge:
|
||||
|
||||
let (line1TextProvider, line2TextProvider) = createLine1And2TextProvider(currentNightscoutData)
|
||||
|
||||
let modTemplate = CLKComplicationTemplateGraphicExtraLargeCircularStackText(
|
||||
line1TextProvider: line1TextProvider, line2TextProvider: line2TextProvider)
|
||||
|
||||
template = modTemplate
|
||||
default: break
|
||||
}
|
||||
|
||||
|
@ -242,10 +277,14 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
|
|||
func getPlaceholderTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) {
|
||||
var template: CLKComplicationTemplate? = nil
|
||||
switch complication.family {
|
||||
case .graphicExtraLarge:
|
||||
template = nil
|
||||
case .modularSmall:
|
||||
template = nil
|
||||
case .modularLarge:
|
||||
template = nil
|
||||
case .extraLarge:
|
||||
template = nil
|
||||
case .utilitarianSmall:
|
||||
template = nil
|
||||
case .utilitarianLarge:
|
||||
|
@ -260,13 +299,15 @@ class ComplicationController: NSObject, CLKComplicationDataSource {
|
|||
|
||||
func getComplicationDescriptors(handler: @escaping ([CLKComplicationDescriptor]) -> Void) {
|
||||
let descriptors = [
|
||||
CLKComplicationDescriptor(identifier: "nightguardComplication", displayName: "Nightguard",
|
||||
CLKComplicationDescriptor(identifier: "nightguardComplication", displayName: "BG Values",
|
||||
supportedFamilies: [CLKComplicationFamily.circularSmall,
|
||||
CLKComplicationFamily.graphicBezel,
|
||||
CLKComplicationFamily.graphicCorner,
|
||||
CLKComplicationFamily.graphicCircular,
|
||||
CLKComplicationFamily.graphicExtraLarge,
|
||||
CLKComplicationFamily.modularLarge,
|
||||
CLKComplicationFamily.modularSmall,
|
||||
CLKComplicationFamily.extraLarge,
|
||||
CLKComplicationFamily.utilitarianLarge,
|
||||
CLKComplicationFamily.utilitarianSmall])
|
||||
]
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>779</string>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>CLKComplicationPrincipalClass</key>
|
||||
<string>$(PRODUCT_MODULE_NAME).ComplicationController</string>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
|
|
|
@ -206,8 +206,10 @@ class MainViewModel: ObservableObject, Identifiable {
|
|||
|
||||
fileprivate func updateComplication() {
|
||||
let complicationServer = CLKComplicationServer.sharedInstance()
|
||||
for complication in complicationServer.activeComplications! {
|
||||
complicationServer.reloadTimeline(for: complication)
|
||||
if complicationServer.activeComplications != nil {
|
||||
for complication in complicationServer.activeComplications! {
|
||||
complicationServer.reloadTimeline(for: complication)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,19 +62,6 @@ class UserDefaultsRepository {
|
|||
key: "alarmSoundFileName",
|
||||
default: "")
|
||||
|
||||
static let showBGOnAppBadge = UserDefaultsValue<Bool>(
|
||||
key: "showBGOnAppBadge",
|
||||
default: false,
|
||||
onChange: { show in
|
||||
#if os(iOS)
|
||||
if show {
|
||||
UIApplication.shared.setCurrentBGValueOnAppBadge()
|
||||
} else {
|
||||
UIApplication.shared.clearAppBadge()
|
||||
}
|
||||
#endif
|
||||
})
|
||||
|
||||
static let alarmNotificationState = UserDefaultsValue<Bool>(key: "alarmNotificationState", default: false)
|
||||
|
||||
// If this is set to true, you can override the default units setting from your backend
|
||||
|
@ -101,13 +88,6 @@ class UserDefaultsRepository {
|
|||
static let maximumBloodGlucoseDisplayed = UserDefaultsValue<Float>(key: "maximumBloodGlucoseDisplayed", default: 350)
|
||||
|
||||
#if os(iOS)
|
||||
static let screenlockSwitchState = UserDefaultsValue<Bool>(
|
||||
key: "screenlockSwitchState",
|
||||
default: UIApplication.shared.isIdleTimerDisabled,
|
||||
onChange: { screenlock in
|
||||
UIApplication.shared.isIdleTimerDisabled = screenlock
|
||||
})
|
||||
|
||||
static let nightscoutUris = UserDefaultsValue<[String]>(key: "nightscoutUris", default: [])
|
||||
|
||||
// minutes of idle (user inactivity) before dimming the screen (0 means never)
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?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>NSExtension</key>
|
||||
<dict>
|
||||
<key>NSExtensionPointIdentifier</key>
|
||||
<string>com.apple.widgetkit-extension</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,59 @@
|
|||
<?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>INEnums</key>
|
||||
<array/>
|
||||
<key>INIntentDefinitionModelVersion</key>
|
||||
<string>1.2</string>
|
||||
<key>INIntentDefinitionNamespace</key>
|
||||
<string>88xZPY</string>
|
||||
<key>INIntentDefinitionSystemVersion</key>
|
||||
<string>20A294</string>
|
||||
<key>INIntentDefinitionToolsBuildVersion</key>
|
||||
<string>12A6144</string>
|
||||
<key>INIntentDefinitionToolsVersion</key>
|
||||
<string>12.0</string>
|
||||
<key>INIntents</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>INIntentCategory</key>
|
||||
<string>information</string>
|
||||
<key>INIntentDescriptionID</key>
|
||||
<string>tVvJ9c</string>
|
||||
<key>INIntentEligibleForWidgets</key>
|
||||
<true/>
|
||||
<key>INIntentIneligibleForSuggestions</key>
|
||||
<true/>
|
||||
<key>INIntentName</key>
|
||||
<string>Configuration</string>
|
||||
<key>INIntentResponse</key>
|
||||
<dict>
|
||||
<key>INIntentResponseCodes</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>INIntentResponseCodeName</key>
|
||||
<string>success</string>
|
||||
<key>INIntentResponseCodeSuccess</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>INIntentResponseCodeName</key>
|
||||
<string>failure</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>INIntentTitle</key>
|
||||
<string>Configuration</string>
|
||||
<key>INIntentTitleID</key>
|
||||
<string>gpCwrM</string>
|
||||
<key>INIntentType</key>
|
||||
<string>Custom</string>
|
||||
<key>INIntentVerb</key>
|
||||
<string>View</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>INTypes</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,163 @@
|
|||
//
|
||||
// nightguard_Widget_Extension.swift
|
||||
// nightguard Widget Extension
|
||||
//
|
||||
// Created by Dirk Hermanns on 14.09.22.
|
||||
// Copyright © 2022 private. All rights reserved.
|
||||
//
|
||||
|
||||
import WidgetKit
|
||||
import SwiftUI
|
||||
import Intents
|
||||
|
||||
struct Provider: IntentTimelineProvider {
|
||||
|
||||
func placeholder(in context: Context) -> NightscoutDataEntry {
|
||||
|
||||
NightscoutDataEntry(configuration: ConfigurationIntent())
|
||||
}
|
||||
|
||||
func getSnapshot(for configuration: ConfigurationIntent, in context: Context, completion: @escaping (NightscoutDataEntry) -> ()) {
|
||||
|
||||
completion(getTimelineData(configuration: configuration))
|
||||
}
|
||||
|
||||
func getTimeline(for configuration: ConfigurationIntent, in context: Context, completion: @escaping (Timeline<Entry>) -> ()) {
|
||||
|
||||
var entries: [NightscoutDataEntry] = []
|
||||
|
||||
entries.append(getTimelineData(configuration: configuration))
|
||||
|
||||
let timeline = Timeline(entries: entries, policy: .atEnd)
|
||||
completion(timeline)
|
||||
}
|
||||
|
||||
private func getTimelineData(configuration: ConfigurationIntent) -> NightscoutDataEntry {
|
||||
let data = NightscoutDataRepository.singleton.loadCurrentNightscoutData()
|
||||
|
||||
let entry = NightscoutDataEntry(
|
||||
date: Date(timeIntervalSince1970: data.time.doubleValue / 1000),
|
||||
sgv: data.sgv,
|
||||
bgdeltaString: data.bgdeltaString,
|
||||
bgdeltaArrow: data.bgdeltaArrow,
|
||||
bgdelta: data.bgdelta,
|
||||
time: data.time,
|
||||
battery: data.battery,
|
||||
iob: data.iob,
|
||||
cob: data.cob,
|
||||
configuration: configuration)
|
||||
|
||||
return entry
|
||||
}
|
||||
}
|
||||
|
||||
struct NightscoutDataEntry: TimelineEntry {
|
||||
|
||||
var date: Date = Date()
|
||||
|
||||
var sgv : String = "---"
|
||||
// the delta Value in Display Units
|
||||
var bgdeltaString : String = "---"
|
||||
var bgdeltaArrow : String = "-"
|
||||
// the delta value in mgdl
|
||||
var bgdelta : Float = 0.0
|
||||
var hourAndMinutes : String {
|
||||
get {
|
||||
if time == 0 {
|
||||
return "??:??"
|
||||
}
|
||||
let formatter = DateFormatter()
|
||||
formatter.dateFormat = "HH:mm"
|
||||
|
||||
let date = Date.init(timeIntervalSince1970: Double(time.int64Value / 1000))
|
||||
return formatter.string(from: date)
|
||||
}
|
||||
}
|
||||
var timeString : String {
|
||||
get {
|
||||
if time == 0 {
|
||||
return "-min"
|
||||
}
|
||||
|
||||
// trick: when displaying the time, we'll add 30 seconds to current time for showing the difference like Nightscout does (0-30 seconds: "0 mins", 31-90 seconds: "1 min", ...)
|
||||
let thirtySeconds = Int64(30 * 1000)
|
||||
|
||||
// calculate how old the current data is
|
||||
let currentTime = Int64(Date().timeIntervalSince1970 * 1000) + thirtySeconds
|
||||
let difference = (currentTime - time.int64Value) / 60000
|
||||
if difference > 59 {
|
||||
return ">1Hr"
|
||||
}
|
||||
return String(difference) + "min"
|
||||
}
|
||||
}
|
||||
var time : NSNumber = 0
|
||||
var battery : String = "---"
|
||||
var iob : String = ""
|
||||
var cob : String = ""
|
||||
let configuration: ConfigurationIntent
|
||||
}
|
||||
|
||||
struct nightguard_Widget_ExtensionEntryView : View {
|
||||
|
||||
@Environment(\.widgetFamily)
|
||||
var widgetFamily
|
||||
var entry: Provider.Entry
|
||||
|
||||
var body: some View {
|
||||
|
||||
switch widgetFamily {
|
||||
case .accessoryInline:
|
||||
Text("| \(entry.hourAndMinutes) \(UnitsConverter.mgdlToDisplayUnits(entry.sgv))\(UnitsConverter.mgdlToDisplayUnits(entry.bgdeltaString))\(entry.bgdeltaArrow)")
|
||||
case .accessoryRectangular:
|
||||
VStack(alignment: .leading) {
|
||||
Text(Date(timeIntervalSince1970: entry.time.doubleValue / 1000), style: .relative)
|
||||
Text("\(UnitsConverter.mgdlToDisplayUnits(entry.sgv))\(UnitsConverter.mgdlToDisplayUnits(entry.bgdeltaString))\(entry.bgdeltaArrow)")
|
||||
Text("\(entry.cob) \(entry.iob)")
|
||||
}
|
||||
case .accessoryCircular:
|
||||
VStack {
|
||||
Text(entry.hourAndMinutes)
|
||||
Text("\(UnitsConverter.mgdlToDisplayUnits(entry.sgv))\(UnitsConverter.mgdlToDisplayUnits(entry.bgdeltaString))")
|
||||
Text("\(entry.bgdeltaArrow)")
|
||||
}
|
||||
|
||||
default:
|
||||
Text("Not implemented.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@main
|
||||
struct nightguard_Widget_Extension: Widget {
|
||||
let kind: String = "nightguard_Widget_Extension"
|
||||
|
||||
var body: some WidgetConfiguration {
|
||||
IntentConfiguration(kind: kind, intent: ConfigurationIntent.self, provider: Provider()) { entry in
|
||||
nightguard_Widget_ExtensionEntryView(entry: entry)
|
||||
}
|
||||
.configurationDisplayName("nightguard widgets")
|
||||
.description("Nightguard lockscreen widgets.")
|
||||
.supportedFamilies(
|
||||
[.accessoryInline,
|
||||
.accessoryCircular,
|
||||
.accessoryRectangular])
|
||||
}
|
||||
}
|
||||
|
||||
struct nightguard_Widget_Extension_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
|
||||
nightguard_Widget_ExtensionEntryView(entry: NightscoutDataEntry(date: Date(), configuration: ConfigurationIntent()))
|
||||
.previewContext(WidgetPreviewContext(family: .accessoryInline))
|
||||
.previewDisplayName("Inline")
|
||||
|
||||
nightguard_Widget_ExtensionEntryView(entry: NightscoutDataEntry(date: Date(), configuration: ConfigurationIntent()))
|
||||
.previewContext(WidgetPreviewContext(family: .accessoryCircular))
|
||||
.previewDisplayName("Circular")
|
||||
|
||||
nightguard_Widget_ExtensionEntryView(entry: NightscoutDataEntry(date: Date(), configuration: ConfigurationIntent()))
|
||||
.previewContext(WidgetPreviewContext(family: .accessoryRectangular))
|
||||
.previewDisplayName("Rectangular")
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?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>com.apple.security.application-groups</key>
|
||||
<array>
|
||||
<string>group.de.my-wan.dhe.nightguard</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -181,6 +181,38 @@
|
|||
438C55A2253C807B0002E109 /* CarbsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438C55A1253C807B0002E109 /* CarbsController.swift */; };
|
||||
438C55A9253C81370002E109 /* CarbsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438C55A8253C81370002E109 /* CarbsView.swift */; };
|
||||
438C55B0253CB0090002E109 /* AddCarbsPopupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438C55AF253CB0090002E109 /* AddCarbsPopupView.swift */; };
|
||||
438DAC7D28D2356800FBF520 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438DAC7C28D2356800FBF520 /* WidgetKit.framework */; };
|
||||
438DAC7F28D2356800FBF520 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 438DAC7E28D2356800FBF520 /* SwiftUI.framework */; };
|
||||
438DAC8228D2356800FBF520 /* nightguard_Widget_Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438DAC8128D2356800FBF520 /* nightguard_Widget_Extension.swift */; };
|
||||
438DAC8528D2356A00FBF520 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 438DAC8428D2356A00FBF520 /* Assets.xcassets */; };
|
||||
438DAC8728D2356A00FBF520 /* nightguard_Widget_Extension.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 438DAC8328D2356800FBF520 /* nightguard_Widget_Extension.intentdefinition */; };
|
||||
438DAC8828D2356A00FBF520 /* nightguard_Widget_Extension.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 438DAC8328D2356800FBF520 /* nightguard_Widget_Extension.intentdefinition */; };
|
||||
438DAC8B28D2356A00FBF520 /* nightguard Widget Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 438DAC7B28D2356800FBF520 /* nightguard Widget Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
|
||||
438DAC9128D253BC00FBF520 /* NightscoutData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F1E0FA1D07698000C329A2 /* NightscoutData.swift */; };
|
||||
438DAC9228D2593700FBF520 /* BloodSugar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F1E0EC1D07693300C329A2 /* BloodSugar.swift */; };
|
||||
438DAC9328D2594D00FBF520 /* TemporaryTargetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BB4B0424CF5DBA00DE96BB /* TemporaryTargetData.swift */; };
|
||||
438DAC9628D259AD00FBF520 /* NightscoutDataRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43794F451C303E4200DB8B58 /* NightscoutDataRepository.swift */; };
|
||||
438DAC9728D259F800FBF520 /* UserDefaultsValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1D96CB021F85BC70035A60E /* UserDefaultsValue.swift */; };
|
||||
438DAC9828D25A1600FBF520 /* UserDefaultsValueGroups.swift in Sources */ = {isa = PBXBuildFile; fileRef = D15055AB2200CD6500F31C1F /* UserDefaultsValueGroups.swift */; };
|
||||
438DAC9928D25A2D00FBF520 /* DeviceStatusData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4303406824C9FF330088AB9A /* DeviceStatusData.swift */; };
|
||||
438DAC9A28D25A3D00FBF520 /* AppConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43794F411C2F435A00DB8B58 /* AppConstants.swift */; };
|
||||
438DAC9B28D25A8000FBF520 /* ObservationToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1ECDA1E2201075B002BE6F9 /* ObservationToken.swift */; };
|
||||
438DAC9C28D25A8D00FBF520 /* TimeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43F1E11A1D076D9700C329A2 /* TimeService.swift */; };
|
||||
438DAC9D28D25AA200FBF520 /* Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1E6B896219C69D9007ED4FE /* Helpers.swift */; };
|
||||
438DAC9E28D25AFF00FBF520 /* Units.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432E62DE1D10ACD200DD7978 /* Units.swift */; };
|
||||
438DAC9F28D25B2400FBF520 /* Treatment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4302C65625D9C7080052777F /* Treatment.swift */; };
|
||||
438DACA028D25B3E00FBF520 /* AnyConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1AEFED721FE00A200821DF6 /* AnyConvertible.swift */; };
|
||||
438DACA228D25B7B00FBF520 /* DoubleExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43288A6F1D20284600EE3999 /* DoubleExtension.swift */; };
|
||||
438DACA428D25B8D00FBF520 /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4334D97F24C32B6D00652D87 /* DateExtension.swift */; };
|
||||
438DACA528D25BA700FBF520 /* UIColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1ECDA252202C8F0002BE6F9 /* UIColorExtension.swift */; };
|
||||
438DACA728D25BF400FBF520 /* FloatExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432E62EA1D15EFC600DD7978 /* FloatExtension.swift */; };
|
||||
438DACAB28D25CB000FBF520 /* QuickSnoozeOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = D16C8EDC22106C9300192117 /* QuickSnoozeOption.swift */; };
|
||||
438DACAC28D25CC200FBF520 /* SnoozeMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1D96CC221FB0FA80035A60E /* SnoozeMessage.swift */; };
|
||||
438DACAE28D25CDC00FBF520 /* VolumeChangeDetector.swift in Sources */ = {isa = PBXBuildFile; fileRef = D16C8EDA221068F000192117 /* VolumeChangeDetector.swift */; };
|
||||
438DACAF28D25D0A00FBF520 /* MPVolumeViewExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D16C8ED82210687200192117 /* MPVolumeViewExtension.swift */; };
|
||||
438DACB028D25D1400FBF520 /* TimerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D112DD3321E9E2DF00ECFB5E /* TimerExtension.swift */; };
|
||||
438DACB128D25D2600FBF520 /* WatchMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1D96CB521FAF6890035A60E /* WatchMessage.swift */; };
|
||||
438DACB528D25DB800FBF520 /* WatchMessageService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1D96CB921FB0E910035A60E /* WatchMessageService.swift */; };
|
||||
43961F4A2533598400B1492B /* ActivateTemporaryTargetPopupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43961F492533598400B1492B /* ActivateTemporaryTargetPopupView.swift */; };
|
||||
43961F6E25336F0600B1492B /* TemporaryTargetController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43961F6D25336F0600B1492B /* TemporaryTargetController.swift */; };
|
||||
43961F752533708D00B1492B /* TemporaryTargetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43961F742533708D00B1492B /* TemporaryTargetView.swift */; };
|
||||
|
@ -202,6 +234,9 @@
|
|||
43BB4B0624CF5DBA00DE96BB /* TemporaryTargetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BB4B0424CF5DBA00DE96BB /* TemporaryTargetData.swift */; };
|
||||
43BB4B0724CF5DBA00DE96BB /* TemporaryTargetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BB4B0424CF5DBA00DE96BB /* TemporaryTargetData.swift */; };
|
||||
43BB4B0824CF5DBA00DE96BB /* TemporaryTargetData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BB4B0424CF5DBA00DE96BB /* TemporaryTargetData.swift */; };
|
||||
43BE674428D78B9B00285798 /* UnitsConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432E62E81D143CF900DD7978 /* UnitsConverter.swift */; };
|
||||
43BE674528D78C0B00285798 /* UserDefaultsRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43794F4E1C343B9800DB8B58 /* UserDefaultsRepository.swift */; };
|
||||
43BE674728D78C8C00285798 /* SharedUserDefaultsRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43BE674628D78C8C00285798 /* SharedUserDefaultsRepository.swift */; };
|
||||
43C87AF8202F21F10000F5F6 /* SnoozeInterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C87AF7202F21F10000F5F6 /* SnoozeInterfaceController.swift */; };
|
||||
43CC9DF924E818BF0008F397 /* CareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43CC9DF824E818BF0008F397 /* CareViewController.swift */; };
|
||||
43CC9DFB24E819C60008F397 /* Care.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 43CC9DFD24E819C60008F397 /* Care.storyboard */; };
|
||||
|
@ -387,6 +422,13 @@
|
|||
remoteGlobalIDString = 43647C001BFF6435004389F9;
|
||||
remoteInfo = "scoutwatch WatchKit Extension";
|
||||
};
|
||||
438DAC8928D2356A00FBF520 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 43647BC21BFF6435004389F9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 438DAC7A28D2356800FBF520;
|
||||
remoteInfo = "nightguard Widget ExtensionExtension";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
|
@ -412,6 +454,17 @@
|
|||
name = "Embed Watch Content";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
438DAC8C28D2356A00FBF520 /* Embed Foundation Extensions */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 13;
|
||||
files = (
|
||||
438DAC8B28D2356A00FBF520 /* nightguard Widget Extension.appex in Embed Foundation Extensions */,
|
||||
);
|
||||
name = "Embed Foundation Extensions";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
|
@ -503,6 +556,13 @@
|
|||
438C55A1253C807B0002E109 /* CarbsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarbsController.swift; sourceTree = "<group>"; };
|
||||
438C55A8253C81370002E109 /* CarbsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarbsView.swift; sourceTree = "<group>"; };
|
||||
438C55AF253CB0090002E109 /* AddCarbsPopupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddCarbsPopupView.swift; sourceTree = "<group>"; };
|
||||
438DAC7B28D2356800FBF520 /* nightguard Widget Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "nightguard Widget Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
438DAC7C28D2356800FBF520 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
|
||||
438DAC7E28D2356800FBF520 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
|
||||
438DAC8128D2356800FBF520 /* nightguard_Widget_Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = nightguard_Widget_Extension.swift; sourceTree = "<group>"; };
|
||||
438DAC8328D2356800FBF520 /* nightguard_Widget_Extension.intentdefinition */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; path = nightguard_Widget_Extension.intentdefinition; sourceTree = "<group>"; };
|
||||
438DAC8428D2356A00FBF520 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
438DAC8628D2356A00FBF520 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
43961F492533598400B1492B /* ActivateTemporaryTargetPopupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivateTemporaryTargetPopupView.swift; sourceTree = "<group>"; };
|
||||
43961F6D25336F0600B1492B /* TemporaryTargetController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemporaryTargetController.swift; sourceTree = "<group>"; };
|
||||
43961F742533708D00B1492B /* TemporaryTargetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemporaryTargetView.swift; sourceTree = "<group>"; };
|
||||
|
@ -516,6 +576,7 @@
|
|||
439FCEB71FD5E97F009D18FD /* BackgroundUrlSessionWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundUrlSessionWrapper.swift; sourceTree = "<group>"; };
|
||||
43A0476A24D2023C0040D853 /* WKInterfaceLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WKInterfaceLabel.swift; sourceTree = "<group>"; };
|
||||
43BB4B0424CF5DBA00DE96BB /* TemporaryTargetData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemporaryTargetData.swift; sourceTree = "<group>"; };
|
||||
43BE674628D78C8C00285798 /* SharedUserDefaultsRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedUserDefaultsRepository.swift; sourceTree = "<group>"; };
|
||||
43C5DE9B24522F3B00BB41D9 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = "<group>"; };
|
||||
43C5DE9C24522F3D00BB41D9 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Alarm.strings; sourceTree = "<group>"; };
|
||||
43C5DE9D24522F3E00BB41D9 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Stats.strings; sourceTree = "<group>"; };
|
||||
|
@ -526,6 +587,7 @@
|
|||
43C5DEA224522F3F00BB41D9 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Interface.strings; sourceTree = "<group>"; };
|
||||
43C5DEA324522F4000BB41D9 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
43C87AF7202F21F10000F5F6 /* SnoozeInterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnoozeInterfaceController.swift; sourceTree = "<group>"; };
|
||||
43CB358D28D71F79002AF707 /* nightguard Widget ExtensionExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "nightguard Widget ExtensionExtension.entitlements"; sourceTree = "<group>"; };
|
||||
43CC9DF824E818BF0008F397 /* CareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CareViewController.swift; sourceTree = "<group>"; };
|
||||
43CC9DFC24E819C60008F397 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Care.storyboard; sourceTree = "<group>"; };
|
||||
43CC9DFF24E819D20008F397 /* fi-FI */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fi-FI"; path = "fi-FI.lproj/Care.strings"; sourceTree = "<group>"; };
|
||||
|
@ -669,6 +731,15 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
438DAC7828D2356800FBF520 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
438DAC7F28D2356800FBF520 /* SwiftUI.framework in Frameworks */,
|
||||
438DAC7D28D2356800FBF520 /* WidgetKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
81615C31F20A3DB028BE7BC8 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -708,6 +779,8 @@
|
|||
648BD28BCECC705FD0778C58 /* Pods_nightguard_WatchKit_Extension.framework */,
|
||||
7DF919C3CB4ABA9B339F76C9 /* Pods_nightguardTests.framework */,
|
||||
FD2A0D1B01CFED46A2591694 /* Pods_nightguardUITests.framework */,
|
||||
438DAC7C28D2356800FBF520 /* WidgetKit.framework */,
|
||||
438DAC7E28D2356800FBF520 /* SwiftUI.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
|
@ -773,11 +846,13 @@
|
|||
43647BC11BFF6435004389F9 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
43CB358D28D71F79002AF707 /* nightguard Widget ExtensionExtension.entitlements */,
|
||||
43647BCC1BFF6435004389F9 /* nightguard */,
|
||||
43647BE11BFF6435004389F9 /* nightguardTests */,
|
||||
43647BEC1BFF6435004389F9 /* nightguardUITests */,
|
||||
43647BF61BFF6435004389F9 /* nightguard WatchKit App */,
|
||||
43647C051BFF6435004389F9 /* nightguard WatchKit Extension */,
|
||||
438DAC8028D2356800FBF520 /* nightguard Widget Extension */,
|
||||
43647BCB1BFF6435004389F9 /* Products */,
|
||||
0CC6802B2D6E9F7675874CD7 /* Pods */,
|
||||
23C80CA818186A7AFE1C1929 /* Frameworks */,
|
||||
|
@ -792,6 +867,7 @@
|
|||
43647BE91BFF6435004389F9 /* nightguard_uitests.xctest */,
|
||||
43647BF21BFF6435004389F9 /* nightguard.app */,
|
||||
43647C011BFF6435004389F9 /* nightguard.appex */,
|
||||
438DAC7B28D2356800FBF520 /* nightguard Widget Extension.appex */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -894,6 +970,7 @@
|
|||
43794F451C303E4200DB8B58 /* NightscoutDataRepository.swift */,
|
||||
43794F4E1C343B9800DB8B58 /* UserDefaultsRepository.swift */,
|
||||
4351E6AF1D2EFA8C001E4AE4 /* StatisticsRepository.swift */,
|
||||
43BE674628D78C8C00285798 /* SharedUserDefaultsRepository.swift */,
|
||||
);
|
||||
name = repository;
|
||||
sourceTree = "<group>";
|
||||
|
@ -914,6 +991,17 @@
|
|||
name = model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
438DAC8028D2356800FBF520 /* nightguard Widget Extension */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
438DAC8128D2356800FBF520 /* nightguard_Widget_Extension.swift */,
|
||||
438DAC8328D2356800FBF520 /* nightguard_Widget_Extension.intentdefinition */,
|
||||
438DAC8428D2356A00FBF520 /* Assets.xcassets */,
|
||||
438DAC8628D2356A00FBF520 /* Info.plist */,
|
||||
);
|
||||
path = "nightguard Widget Extension";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4398937A252BBF88007A252F /* controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1143,11 +1231,13 @@
|
|||
43647BC81BFF6435004389F9 /* Resources */,
|
||||
43647C1C1BFF6435004389F9 /* Embed Watch Content */,
|
||||
B558B068A5B821E9E0E607D5 /* [CP] Embed Pods Frameworks */,
|
||||
438DAC8C28D2356A00FBF520 /* Embed Foundation Extensions */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
43647BF51BFF6435004389F9 /* PBXTargetDependency */,
|
||||
438DAC8A28D2356A00FBF520 /* PBXTargetDependency */,
|
||||
);
|
||||
name = nightguard;
|
||||
productName = scoutwatch;
|
||||
|
@ -1230,13 +1320,30 @@
|
|||
productReference = 43647C011BFF6435004389F9 /* nightguard.appex */;
|
||||
productType = "com.apple.product-type.watchkit2-extension";
|
||||
};
|
||||
438DAC7A28D2356800FBF520 /* nightguard Widget Extension */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 438DAC8F28D2356A00FBF520 /* Build configuration list for PBXNativeTarget "nightguard Widget Extension" */;
|
||||
buildPhases = (
|
||||
438DAC7728D2356800FBF520 /* Sources */,
|
||||
438DAC7828D2356800FBF520 /* Frameworks */,
|
||||
438DAC7928D2356800FBF520 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "nightguard Widget Extension";
|
||||
productName = "nightguard Widget ExtensionExtension";
|
||||
productReference = 438DAC7B28D2356800FBF520 /* nightguard Widget Extension.appex */;
|
||||
productType = "com.apple.product-type.app-extension";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
43647BC21BFF6435004389F9 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0710;
|
||||
LastSwiftUpdateCheck = 1400;
|
||||
LastUpgradeCheck = 1200;
|
||||
ORGANIZATIONNAME = private;
|
||||
TargetAttributes = {
|
||||
|
@ -1282,6 +1389,9 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
438DAC7A28D2356800FBF520 = {
|
||||
CreatedOnToolsVersion = 14.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 43647BC51BFF6435004389F9 /* Build configuration list for PBXProject "nightguard" */;
|
||||
|
@ -1304,6 +1414,7 @@
|
|||
43647BE81BFF6435004389F9 /* nightguardUITests */,
|
||||
43647BF11BFF6435004389F9 /* nightguard WatchKit App */,
|
||||
43647C001BFF6435004389F9 /* nightguard WatchKit Extension */,
|
||||
438DAC7A28D2356800FBF520 /* nightguard Widget Extension */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
@ -1364,6 +1475,14 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
438DAC7928D2356800FBF520 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
438DAC8528D2356A00FBF520 /* Assets.xcassets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
|
@ -1596,6 +1715,7 @@
|
|||
43119B941C3AAE6600DD6D35 /* UIColorChanger.swift in Sources */,
|
||||
D1D96CC021FB0F2E0035A60E /* UserDefaultsSyncMessage.swift in Sources */,
|
||||
D1AEFED821FE00A200821DF6 /* AnyConvertible.swift in Sources */,
|
||||
438DAC8828D2356A00FBF520 /* nightguard_Widget_Extension.intentdefinition in Sources */,
|
||||
D133079221C85FAE00DC6879 /* RegressionHelper.swift in Sources */,
|
||||
4302C65725D9C7080052777F /* Treatment.swift in Sources */,
|
||||
D123EFE821FB643D00CE8718 /* EmptyWatchMessage.swift in Sources */,
|
||||
|
@ -1616,6 +1736,7 @@
|
|||
4302C69125DC4F530052777F /* CorrectionBolusTreatment.swift in Sources */,
|
||||
434982352534DE4F00CF0014 /* DictionaryExtension.swift in Sources */,
|
||||
D160D092220E4249002B4633 /* AlertVolumeViewController.swift in Sources */,
|
||||
43BE674728D78C8C00285798 /* SharedUserDefaultsRepository.swift in Sources */,
|
||||
D133078421C424A800DC6879 /* ArrayExtension.swift in Sources */,
|
||||
D1DA7C6C21BE810900B39675 /* UIApplicationExtension.swift in Sources */,
|
||||
4302C65E25D9C7A80052777F /* MealBolusTreatment.swift in Sources */,
|
||||
|
@ -1863,6 +1984,42 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
438DAC7728D2356800FBF520 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
438DACAB28D25CB000FBF520 /* QuickSnoozeOption.swift in Sources */,
|
||||
438DAC9E28D25AFF00FBF520 /* Units.swift in Sources */,
|
||||
438DAC9828D25A1600FBF520 /* UserDefaultsValueGroups.swift in Sources */,
|
||||
438DAC9C28D25A8D00FBF520 /* TimeService.swift in Sources */,
|
||||
438DAC9328D2594D00FBF520 /* TemporaryTargetData.swift in Sources */,
|
||||
438DAC8228D2356800FBF520 /* nightguard_Widget_Extension.swift in Sources */,
|
||||
438DAC9228D2593700FBF520 /* BloodSugar.swift in Sources */,
|
||||
438DAC9B28D25A8000FBF520 /* ObservationToken.swift in Sources */,
|
||||
438DAC9628D259AD00FBF520 /* NightscoutDataRepository.swift in Sources */,
|
||||
43BE674528D78C0B00285798 /* UserDefaultsRepository.swift in Sources */,
|
||||
438DACB128D25D2600FBF520 /* WatchMessage.swift in Sources */,
|
||||
438DACB528D25DB800FBF520 /* WatchMessageService.swift in Sources */,
|
||||
438DAC9128D253BC00FBF520 /* NightscoutData.swift in Sources */,
|
||||
438DACAC28D25CC200FBF520 /* SnoozeMessage.swift in Sources */,
|
||||
438DACA528D25BA700FBF520 /* UIColorExtension.swift in Sources */,
|
||||
438DACB028D25D1400FBF520 /* TimerExtension.swift in Sources */,
|
||||
438DACAE28D25CDC00FBF520 /* VolumeChangeDetector.swift in Sources */,
|
||||
438DAC9728D259F800FBF520 /* UserDefaultsValue.swift in Sources */,
|
||||
438DACA228D25B7B00FBF520 /* DoubleExtension.swift in Sources */,
|
||||
438DAC8728D2356A00FBF520 /* nightguard_Widget_Extension.intentdefinition in Sources */,
|
||||
438DACA428D25B8D00FBF520 /* DateExtension.swift in Sources */,
|
||||
438DAC9D28D25AA200FBF520 /* Helpers.swift in Sources */,
|
||||
438DAC9F28D25B2400FBF520 /* Treatment.swift in Sources */,
|
||||
438DAC9A28D25A3D00FBF520 /* AppConstants.swift in Sources */,
|
||||
438DACA728D25BF400FBF520 /* FloatExtension.swift in Sources */,
|
||||
438DACAF28D25D0A00FBF520 /* MPVolumeViewExtension.swift in Sources */,
|
||||
438DAC9928D25A2D00FBF520 /* DeviceStatusData.swift in Sources */,
|
||||
438DACA028D25B3E00FBF520 /* AnyConvertible.swift in Sources */,
|
||||
43BE674428D78B9B00285798 /* UnitsConverter.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
|
@ -1886,6 +2043,11 @@
|
|||
target = 43647C001BFF6435004389F9 /* nightguard WatchKit Extension */;
|
||||
targetProxy = 43647C031BFF6435004389F9 /* PBXContainerItemProxy */;
|
||||
};
|
||||
438DAC8A28D2356A00FBF520 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 438DAC7A28D2356800FBF520 /* nightguard Widget Extension */;
|
||||
targetProxy = 438DAC8928D2356A00FBF520 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
|
@ -2119,7 +2281,7 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 779;
|
||||
CURRENT_PROJECT_VERSION = 785;
|
||||
DEVELOPMENT_TEAM = BSAVUVP8PV;
|
||||
INFOPLIST_FILE = "nightguard WatchKit Extension/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
|
@ -2127,7 +2289,7 @@
|
|||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.7.1;
|
||||
MARKETING_VERSION = 3.7.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.my-wan.dhe.nightguard.watchkitapp.watchkitextension";
|
||||
PRODUCT_NAME = nightguard;
|
||||
PROVISIONING_PROFILE = "";
|
||||
|
@ -2150,7 +2312,7 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 779;
|
||||
CURRENT_PROJECT_VERSION = 785;
|
||||
DEVELOPMENT_TEAM = BSAVUVP8PV;
|
||||
INFOPLIST_FILE = "nightguard WatchKit Extension/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
|
@ -2158,7 +2320,7 @@
|
|||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.7.1;
|
||||
MARKETING_VERSION = 3.7.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.my-wan.dhe.nightguard.watchkitapp.watchkitextension";
|
||||
PRODUCT_NAME = nightguard;
|
||||
PROVISIONING_PROFILE = "";
|
||||
|
@ -2182,7 +2344,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = "nightguard WatchKit App/nightguard.entitlements";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 779;
|
||||
CURRENT_PROJECT_VERSION = 785;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = BSAVUVP8PV;
|
||||
IBSC_MODULE = scoutwatch_WatchKit_Extension;
|
||||
|
@ -2192,7 +2354,7 @@
|
|||
"@executable_path/../Frameworks",
|
||||
"@loader_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.7.1;
|
||||
MARKETING_VERSION = 3.7.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.my-wan.dhe.nightguard.watchkitapp";
|
||||
PRODUCT_NAME = nightguard;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
@ -2215,7 +2377,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = "nightguard WatchKit App/nightguard.entitlements";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 779;
|
||||
CURRENT_PROJECT_VERSION = 785;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = BSAVUVP8PV;
|
||||
IBSC_MODULE = scoutwatch_WatchKit_Extension;
|
||||
|
@ -2225,7 +2387,7 @@
|
|||
"@executable_path/../Frameworks",
|
||||
"@loader_path/../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.7.1;
|
||||
MARKETING_VERSION = 3.7.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.my-wan.dhe.nightguard.watchkitapp";
|
||||
PRODUCT_NAME = nightguard;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
@ -2241,11 +2403,12 @@
|
|||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 69F9AFF1EF78A172349B22B6 /* Pods-nightguard.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = nightguard/scoutwatch.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 779;
|
||||
CURRENT_PROJECT_VERSION = 785;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = BSAVUVP8PV;
|
||||
ENABLE_BITCODE = NO;
|
||||
|
@ -2254,7 +2417,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.7.1;
|
||||
MARKETING_VERSION = 3.7.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.my-wan.dhe.nightguard";
|
||||
PRODUCT_NAME = nightguard;
|
||||
PROVISIONING_PROFILE = "";
|
||||
|
@ -2269,11 +2432,12 @@
|
|||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 0BC4D92A1BF3678D2BB7E48B /* Pods-nightguard.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = nightguard/scoutwatch.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CURRENT_PROJECT_VERSION = 779;
|
||||
CURRENT_PROJECT_VERSION = 785;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = BSAVUVP8PV;
|
||||
ENABLE_BITCODE = NO;
|
||||
|
@ -2282,7 +2446,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.7.1;
|
||||
MARKETING_VERSION = 3.7.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.my-wan.dhe.nightguard";
|
||||
PRODUCT_NAME = nightguard;
|
||||
PROVISIONING_PROFILE = "";
|
||||
|
@ -2374,6 +2538,86 @@
|
|||
};
|
||||
name = Release;
|
||||
};
|
||||
438DAC8D28D2356A00FBF520 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_ENTITLEMENTS = "nightguard Widget ExtensionExtension.entitlements";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = BSAVUVP8PV;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "nightguard Widget Extension/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "nightguard Widget Extension";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 private. All rights reserved.";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.my-wan.dhe.nightguard.widgetextension";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
438DAC8E28D2356A00FBF520 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_ENTITLEMENTS = "nightguard Widget ExtensionExtension.entitlements";
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = BSAVUVP8PV;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = "nightguard Widget Extension/Info.plist";
|
||||
INFOPLIST_KEY_CFBundleDisplayName = "nightguard Widget Extension";
|
||||
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2022 private. All rights reserved.";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "de.my-wan.dhe.nightguard.widgetextension";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
|
@ -2431,6 +2675,15 @@
|
|||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
438DAC8F28D2356A00FBF520 /* Build configuration list for PBXNativeTarget "nightguard Widget Extension" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
438DAC8D28D2356A00FBF520 /* Debug */,
|
||||
438DAC8E28D2356A00FBF520 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 43647BC21BFF6435004389F9 /* Project object */;
|
||||
|
|
|
@ -78,10 +78,8 @@
|
|||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES"
|
||||
launchAutomaticallySubstyle = "32">
|
||||
<RemoteRunnable
|
||||
runnableDebuggingMode = "2"
|
||||
BundleIdentifier = "com.apple.Carousel"
|
||||
RemotePath = "/Nightguard">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "43647BF11BFF6435004389F9"
|
||||
|
@ -89,7 +87,7 @@
|
|||
BlueprintName = "nightguard WatchKit App"
|
||||
ReferencedContainer = "container:nightguard.xcodeproj">
|
||||
</BuildableReference>
|
||||
</RemoteRunnable>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
@ -98,10 +96,8 @@
|
|||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
launchAutomaticallySubstyle = "32">
|
||||
<RemoteRunnable
|
||||
runnableDebuggingMode = "2"
|
||||
BundleIdentifier = "com.apple.Carousel"
|
||||
RemotePath = "/Nightguard">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "43647BF11BFF6435004389F9"
|
||||
|
@ -109,16 +105,7 @@
|
|||
BlueprintName = "nightguard WatchKit App"
|
||||
ReferencedContainer = "container:nightguard.xcodeproj">
|
||||
</BuildableReference>
|
||||
</RemoteRunnable>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "43647BF11BFF6435004389F9"
|
||||
BuildableName = "nightguard.app"
|
||||
BlueprintName = "nightguard WatchKit App"
|
||||
ReferencedContainer = "container:nightguard.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
|
|
|
@ -79,10 +79,8 @@
|
|||
allowLocationSimulation = "YES"
|
||||
launchAutomaticallySubstyle = "8"
|
||||
notificationPayloadFile = "nightguard WatchKit Extension/PushNotificationPayload.apns">
|
||||
<RemoteRunnable
|
||||
runnableDebuggingMode = "2"
|
||||
BundleIdentifier = "com.apple.Carousel"
|
||||
RemotePath = "/Nightguard">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "43647BF11BFF6435004389F9"
|
||||
|
@ -90,7 +88,7 @@
|
|||
BlueprintName = "nightguard WatchKit App"
|
||||
ReferencedContainer = "container:nightguard.xcodeproj">
|
||||
</BuildableReference>
|
||||
</RemoteRunnable>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
@ -100,10 +98,8 @@
|
|||
debugDocumentVersioning = "YES"
|
||||
launchAutomaticallySubstyle = "8"
|
||||
notificationPayloadFile = "nightguard WatchKit Extension/PushNotificationPayload.apns">
|
||||
<RemoteRunnable
|
||||
runnableDebuggingMode = "2"
|
||||
BundleIdentifier = "com.apple.Carousel"
|
||||
RemotePath = "/Nightguard">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "43647BF11BFF6435004389F9"
|
||||
|
@ -111,16 +107,7 @@
|
|||
BlueprintName = "nightguard WatchKit App"
|
||||
ReferencedContainer = "container:nightguard.xcodeproj">
|
||||
</BuildableReference>
|
||||
</RemoteRunnable>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "43647BF11BFF6435004389F9"
|
||||
BuildableName = "nightguard.app"
|
||||
BlueprintName = "nightguard WatchKit App"
|
||||
ReferencedContainer = "container:nightguard.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
|
|
|
@ -79,10 +79,8 @@
|
|||
allowLocationSimulation = "YES"
|
||||
launchAutomaticallySubstyle = "32"
|
||||
notificationPayloadFile = "nightguard WatchKit Extension/PushNotificationPayload.apns">
|
||||
<RemoteRunnable
|
||||
runnableDebuggingMode = "2"
|
||||
BundleIdentifier = "com.apple.Carousel"
|
||||
RemotePath = "/Nightguard">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "43647BF11BFF6435004389F9"
|
||||
|
@ -90,7 +88,7 @@
|
|||
BlueprintName = "nightguard WatchKit App"
|
||||
ReferencedContainer = "container:nightguard.xcodeproj">
|
||||
</BuildableReference>
|
||||
</RemoteRunnable>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
@ -98,10 +96,8 @@
|
|||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<RemoteRunnable
|
||||
runnableDebuggingMode = "2"
|
||||
BundleIdentifier = "com.apple.Carousel"
|
||||
RemotePath = "/Nightguard">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "43647BF11BFF6435004389F9"
|
||||
|
@ -109,16 +105,7 @@
|
|||
BlueprintName = "nightguard WatchKit App"
|
||||
ReferencedContainer = "container:nightguard.xcodeproj">
|
||||
</BuildableReference>
|
||||
</RemoteRunnable>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "43647BF11BFF6435004389F9"
|
||||
BuildableName = "nightguard.app"
|
||||
BlueprintName = "nightguard WatchKit App"
|
||||
ReferencedContainer = "container:nightguard.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
|
|
|
@ -19,6 +19,16 @@
|
|||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>nightguard Widget Extension.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>11</integer>
|
||||
</dict>
|
||||
<key>nightguard Widget ExtensionExtension.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>11</integer>
|
||||
</dict>
|
||||
<key>nightguard.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
|
|
|
@ -81,7 +81,7 @@ class AlarmNotificationService {
|
|||
content.body = "\(alarmActivationReason)"
|
||||
if let sgv = Float(UnitsConverter.mgdlToDisplayUnits(nightscoutData.sgv)) {
|
||||
// display the current sgv on appbadge only if the user actived it:
|
||||
if UserDefaultsRepository.showBGOnAppBadge.value {
|
||||
if SharedUserDefaultsRepository.showBGOnAppBadge.value {
|
||||
content.badge = NSNumber(value: sgv)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,12 +42,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
)
|
||||
|
||||
// set "prevent screen lock" to ON when the app is started for the first time
|
||||
if !UserDefaultsRepository.screenlockSwitchState.exists {
|
||||
UserDefaultsRepository.screenlockSwitchState.value = true
|
||||
if !SharedUserDefaultsRepository.screenlockSwitchState.exists {
|
||||
SharedUserDefaultsRepository.screenlockSwitchState.value = true
|
||||
}
|
||||
|
||||
// set the "prevent screen lock" option when the app is started
|
||||
UIApplication.shared.isIdleTimerDisabled = UserDefaultsRepository.screenlockSwitchState.value
|
||||
UIApplication.shared.isIdleTimerDisabled = SharedUserDefaultsRepository.screenlockSwitchState.value
|
||||
|
||||
AlarmSound.volumeChangeDetector.onVolumeChange = { [weak self] in
|
||||
self?.window?.rootViewController?.handleQuickSnooze(option: UserDefaultsRepository.volumeKeysOnAlertSnoozeOption.value)
|
||||
|
@ -89,7 +89,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
}
|
||||
|
||||
let updateWindowUserInteractionTimeout = {
|
||||
if UserDefaultsRepository.screenlockSwitchState.value {
|
||||
if SharedUserDefaultsRepository.screenlockSwitchState.value {
|
||||
window.timeout = TimeInterval(UserDefaultsRepository.dimScreenWhenIdle.value * 60)
|
||||
} else {
|
||||
window.timeout = nil
|
||||
|
@ -100,7 +100,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
UserDefaultsRepository.dimScreenWhenIdle.observeChanges { _ in
|
||||
updateWindowUserInteractionTimeout()
|
||||
}
|
||||
UserDefaultsRepository.screenlockSwitchState.observeChanges { _ in
|
||||
SharedUserDefaultsRepository.screenlockSwitchState.observeChanges { _ in
|
||||
updateWindowUserInteractionTimeout()
|
||||
}
|
||||
|
||||
|
@ -217,7 +217,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||
}
|
||||
|
||||
// update app badge
|
||||
if UserDefaultsRepository.showBGOnAppBadge.value {
|
||||
if SharedUserDefaultsRepository.showBGOnAppBadge.value {
|
||||
UIApplication.shared.setCurrentBGValueOnAppBadge()
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>779</string>
|
||||
<string>785</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
|
|
|
@ -457,7 +457,7 @@ class MainViewController: UIViewController, SlideToSnoozeDelegate {
|
|||
self.evaluateAlarmActivationState()
|
||||
|
||||
// update app badge
|
||||
if UserDefaultsRepository.showBGOnAppBadge.value {
|
||||
if SharedUserDefaultsRepository.showBGOnAppBadge.value {
|
||||
UIApplication.shared.setCurrentBGValueOnAppBadge()
|
||||
}
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ class NightscoutService {
|
|||
}
|
||||
}
|
||||
|
||||
/* Reads all data between two timestamps and limits the maximum return values to 400. */
|
||||
/* Reads all data between two timestamps and limits the maximum return values to 1440. */
|
||||
@discardableResult
|
||||
func readChartDataWithinPeriodOfTime(oldValues : [BloodSugar], _ timestamp1 : Date, timestamp2 : Date, resultHandler : @escaping (NightscoutRequestResult<[BloodSugar]>) -> Void) -> URLSessionTask? {
|
||||
|
||||
|
@ -158,7 +158,7 @@ class NightscoutService {
|
|||
let chartDataWithinPeriodOfTimeQueryParams = [
|
||||
"find[date][$gt]" : "\(unixTimestamp1)",
|
||||
"find[date][$lte]" : "\(unixTimestamp2)",
|
||||
"count" : "400",
|
||||
"count" : "1440",
|
||||
]
|
||||
|
||||
let url = UserDefaultsRepository.getUrlWithPathAndQueryParameters(path: "api/v1/entries.json", queryParams: chartDataWithinPeriodOfTimeQueryParams)
|
||||
|
|
|
@ -138,18 +138,18 @@ class PrefsViewController: CustomFormViewController {
|
|||
+++ Section(footer: NSLocalizedString("Keeping the screen active is of paramount importance if using the app as a night guard. We suggest leaving it ALWAYS ON.", comment: "Footer for Dim Screen"))
|
||||
<<< SwitchRow("KeepScreenActive") { row in
|
||||
row.title = NSLocalizedString("Keep the Screen Active", comment: "Label for Keep the Screen Active")
|
||||
row.value = UserDefaultsRepository.screenlockSwitchState.value
|
||||
row.value = SharedUserDefaultsRepository.screenlockSwitchState.value
|
||||
}.onChange { [weak self] row in
|
||||
guard let value = row.value else { return }
|
||||
|
||||
if value {
|
||||
UserDefaultsRepository.screenlockSwitchState.value = value
|
||||
SharedUserDefaultsRepository.screenlockSwitchState.value = value
|
||||
} else {
|
||||
self?.showYesNoAlert(
|
||||
title: NSLocalizedString("ARE YOU SURE?", comment: "Title for confirmation"),
|
||||
message: NSLocalizedString("Keep this switch ON to disable the screenlock and prevent the app to get stopped!", comment: "Message for confirmation"),
|
||||
yesHandler: {
|
||||
UserDefaultsRepository.screenlockSwitchState.value = value
|
||||
SharedUserDefaultsRepository.screenlockSwitchState.value = value
|
||||
},
|
||||
noHandler: {
|
||||
row.value = true
|
||||
|
@ -198,10 +198,10 @@ class PrefsViewController: CustomFormViewController {
|
|||
|
||||
<<< SwitchRow() { row in
|
||||
row.title = NSLocalizedString("Show BG on App Badge", comment: "Label for Show BG on Badge")
|
||||
row.value = UserDefaultsRepository.showBGOnAppBadge.value
|
||||
row.value = SharedUserDefaultsRepository.showBGOnAppBadge.value
|
||||
}.onChange { row in
|
||||
guard let value = row.value else { return }
|
||||
UserDefaultsRepository.showBGOnAppBadge.value = value
|
||||
SharedUserDefaultsRepository.showBGOnAppBadge.value = value
|
||||
}
|
||||
|
||||
<<< SwitchRow() { row in
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
//
|
||||
// SharedUserDefaultsRepository.swift
|
||||
// nightguard
|
||||
//
|
||||
// Created by Dirk Hermanns on 18.09.22.
|
||||
// Copyright © 2022 private. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import UIKit
|
||||
|
||||
/*
|
||||
* UserDefaults that need access to a shared reference.
|
||||
* This is separated from the UserDefaultsRepository, since it can't be used
|
||||
* from a Widget.
|
||||
*/
|
||||
class SharedUserDefaultsRepository {
|
||||
|
||||
static let showBGOnAppBadge = UserDefaultsValue<Bool>(
|
||||
key: "showBGOnAppBadge",
|
||||
default: false,
|
||||
onChange: { show in
|
||||
#if os(iOS)
|
||||
if show {
|
||||
UIApplication.shared.setCurrentBGValueOnAppBadge()
|
||||
} else {
|
||||
UIApplication.shared.clearAppBadge()
|
||||
}
|
||||
#endif
|
||||
})
|
||||
|
||||
#if os(iOS)
|
||||
static let screenlockSwitchState = UserDefaultsValue<Bool>(
|
||||
key: "screenlockSwitchState",
|
||||
default: UIApplication.shared.isIdleTimerDisabled,
|
||||
onChange: { screenlock in
|
||||
UIApplication.shared.isIdleTimerDisabled = screenlock
|
||||
})
|
||||
#endif
|
||||
}
|
|
@ -22,7 +22,7 @@ extension UIApplication {
|
|||
}
|
||||
let sgvAsInt = Int(sgvAsDouble.rounded())
|
||||
|
||||
UNUserNotificationCenter.current().requestAuthorization(options: .badge) { (granted, error) in
|
||||
UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .alert, .sound, .criticalAlert]) { (granted, error) in
|
||||
if granted && error == nil {
|
||||
|
||||
// success!
|
||||
|
|
|
@ -19,6 +19,6 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>779</string>
|
||||
<string>785</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -19,6 +19,6 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>779</string>
|
||||
<string>785</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Loading…
Reference in New Issue