diff --git a/Calendarr iOS.xcodeproj/project.pbxproj b/Calendarr iOS.xcodeproj/project.pbxproj
index ee60bd5..042e865 100644
--- a/Calendarr iOS.xcodeproj/project.pbxproj
+++ b/Calendarr iOS.xcodeproj/project.pbxproj
@@ -1092,6 +1092,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
+ MARKETING_VERSION = 3.6;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -1142,6 +1143,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
+ MARKETING_VERSION = 3.6;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
diff --git a/Calendarr iOS.xcodeproj/xcshareddata/xcschemes/CalendarrWatch.xcscheme b/Calendarr iOS.xcodeproj/xcshareddata/xcschemes/CalendarrWatch.xcscheme
new file mode 100644
index 0000000..8f43674
--- /dev/null
+++ b/Calendarr iOS.xcodeproj/xcshareddata/xcschemes/CalendarrWatch.xcscheme
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Calendarr iOS.xcodeproj/xcshareddata/xcschemes/CalendarrWatchComplications.xcscheme b/Calendarr iOS.xcodeproj/xcshareddata/xcschemes/CalendarrWatchComplications.xcscheme
new file mode 100644
index 0000000..a75fd59
--- /dev/null
+++ b/Calendarr iOS.xcodeproj/xcshareddata/xcschemes/CalendarrWatchComplications.xcscheme
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Calendarr iOS.xcodeproj/xcshareddata/xcschemes/CalendarrWidgets.xcscheme b/Calendarr iOS.xcodeproj/xcshareddata/xcschemes/CalendarrWidgets.xcscheme
new file mode 100644
index 0000000..2f53f09
--- /dev/null
+++ b/Calendarr iOS.xcodeproj/xcshareddata/xcschemes/CalendarrWidgets.xcscheme
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CalendarrWatchComplications/CornerComplicationViews.swift b/CalendarrWatchComplications/CornerComplicationViews.swift
index 2d614ea..ea0ffe4 100644
--- a/CalendarrWatchComplications/CornerComplicationViews.swift
+++ b/CalendarrWatchComplications/CornerComplicationViews.swift
@@ -26,7 +26,7 @@ struct CornerCountdownComplicationView: View {
}
}
.widgetLabel {
- Text(WatchComplicationSupport.cornerLabel(next, at: entry.date, language: entry.language))
+ Text(WatchComplicationSupport.eventLabel(next, at: entry.date, language: entry.language))
}
}
}
diff --git a/CalendarrWatchComplications/SmallComplicationViews.swift b/CalendarrWatchComplications/SmallComplicationViews.swift
index e80ce1a..acb7874 100644
--- a/CalendarrWatchComplications/SmallComplicationViews.swift
+++ b/CalendarrWatchComplications/SmallComplicationViews.swift
@@ -2,6 +2,18 @@ import SwiftUI
import WidgetKit
import CalendarrCore
+/// Attaches the curved bezel label that a face with a bezel slot — Infograph —
+/// renders across the top, where the tick marks otherwise are. Faces without
+/// that slot ignore it, so it costs nothing to always provide.
+private extension View {
+ func eventBezelLabel(_ entry: WatchComplicationEntry) -> some View {
+ let next = WatchComplicationSupport.nextEvent(in: entry.snapshot, at: entry.date)
+ return widgetLabel {
+ Text(WatchComplicationSupport.eventLabel(next, at: entry.date, language: entry.language))
+ }
+ }
+}
+
/// A draining ring plus the remaining time.
struct CountdownComplicationView: View {
let entry: WatchComplicationEntry
@@ -32,6 +44,7 @@ struct CountdownComplicationView: View {
}
.gaugeStyle(.accessoryCircularCapacity)
.widgetAccentable()
+ .eventBezelLabel(entry)
} else {
ZStack {
AccessoryWidgetBackground()
@@ -82,6 +95,7 @@ struct DateComplicationView: View {
}
.gaugeStyle(.accessoryCircularCapacity)
.widgetAccentable()
+ .eventBezelLabel(entry)
}
}
}
@@ -112,6 +126,7 @@ struct TodayCountComplicationView: View {
}
.gaugeStyle(.accessoryCircularCapacity)
.widgetAccentable()
+ .eventBezelLabel(entry)
}
}
}
diff --git a/CalendarrWatchComplications/WatchComplicationSupport.swift b/CalendarrWatchComplications/WatchComplicationSupport.swift
index 65f141a..d507fb6 100644
--- a/CalendarrWatchComplications/WatchComplicationSupport.swift
+++ b/CalendarrWatchComplications/WatchComplicationSupport.swift
@@ -89,9 +89,15 @@ enum WatchComplicationSupport {
return formatter.string(from: date).uppercased()
}
- /// The curved bezel label for a corner complication: time plus title, or a
- /// plain "no events".
- static func cornerLabel(_ event: SnapshotEvent?, at now: Date, language: String) -> String {
+ /// The curved label that accompanies a circular or corner complication:
+ /// time plus title, or a plain "no events".
+ ///
+ /// On a corner this follows the screen edge. On a face with a bezel slot —
+ /// Infograph — the same label arcs across the top, where the tick marks
+ /// otherwise are. That is the position ClockKit called `graphicBezel`, and
+ /// in WidgetKit it is reached by attaching `.widgetLabel` to an
+ /// `accessoryCircular` widget.
+ static func eventLabel(_ event: SnapshotEvent?, at now: Date, language: String) -> String {
guard let event else { return WatchL10n.t("watch.no_events", language) }
if event.isAllDay { return event.title }
return "\(time(event.start, language: language)) \(event.title)"