feat: add widget extension — small, medium, large

- KisaniCalWidget: 3 sizes sharing the app's design language
  Small: date badge + kisaniCAL. wordmark + task count
  Medium: badge + task list (3 items) + workout row
  Large: badge + full task list (6 items) + workout row

- WidgetDataStore (Shared/): lightweight Codable types for App Group
  UserDefaults cross-process data exchange

- WidgetBridge: TaskViewModel/WorkoutViewModel extensions that sync
  data into App Group and call WidgetCenter.reloadAllTimelines()

- ContentView: calls syncWidget() on appear and scene becoming active

- project.yml + entitlements updated; project regenerated via xcodegen
This commit is contained in:
kutesir
2026-05-28 19:48:01 +03:00
parent 05a579e2f7
commit 5e232f2d81
9 changed files with 739 additions and 24 deletions

View File

@@ -13,6 +13,7 @@ targets:
deploymentTarget: "16.0"
sources:
- path: KisaniCal
- path: Shared
settings:
base:
SWIFT_VERSION: 5.9
@@ -28,5 +29,27 @@ targets:
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME: AccentColor
CODE_SIGN_STYLE: Automatic
ENABLE_PREVIEWS: YES
CODE_SIGN_ENTITLEMENTS: KisaniCal/KisaniCal.entitlements
INFOPLIST_KEY_NSCalendarsUsageDescription: "Kisani Cal shows your calendar events alongside tasks."
INFOPLIST_KEY_NSCalendarsFullAccessUsageDescription: "Kisani Cal shows your calendar events alongside tasks."
dependencies:
- target: KisaniCalWidget
embed: true
KisaniCalWidget:
type: app-extension
platform: iOS
deploymentTarget: "16.0"
sources:
- path: KisaniCalWidget
- path: Shared
settings:
base:
SWIFT_VERSION: 5.9
PRODUCT_BUNDLE_IDENTIFIER: com.kutesir.KisaniCal.widget
GENERATE_INFOPLIST_FILE: YES
INFOPLIST_KEY_NSExtensionPointIdentifier: com.apple.widgetkit-extension
CODE_SIGN_STYLE: Automatic
CODE_SIGN_ENTITLEMENTS: KisaniCalWidget/KisaniCalWidget.entitlements
SKIP_INSTALL: YES
LD_RUNPATH_SEARCH_PATHS: "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"