Add Apple Watch companion app with complications and WCSession sync

- Add watchOS app target with mood voting UI (5 mood buttons)
- Add WidgetKit complications (circular, corner, inline, rectangular)
- Add WatchConnectivityManager for bidirectional sync between iOS and watch
- iOS app acts as central coordinator - all mood logging flows through MoodLogger
- Watch votes send to iPhone via WCSession, iPhone logs and notifies watch back
- Widget votes use openAppWhenRun=true to run MoodLogger in main app process
- Add #if !os(watchOS) guards to Mood.swift and Random.swift for compatibility
- Update SKStoreReviewController to AppStore.requestReview (iOS 18 deprecation fix)
- Watch reads user's moodImages preference from GroupUserDefaults for emoji style

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-21 17:19:17 -06:00
parent d902694cdd
commit 224c00423a
20 changed files with 1148 additions and 57 deletions

View File

@@ -58,23 +58,24 @@ enum Mood: Int {
}
}
static var allValues: [Mood] {
return [Mood.horrible, Mood.bad, Mood.average, Mood.good, Mood.great].reversed()
}
#if !os(watchOS)
var color: Color {
let moodTint: MoodTintable.Type = UserDefaultsStore.moodTintable()
return moodTint.color(forMood: self)
}
static var allValues: [Mood] {
return [Mood.horrible, Mood.bad, Mood.average, Mood.good, Mood.great].reversed()
}
var icon: Image {
let moodImages: MoodImagable.Type = UserDefaultsStore.moodMoodImagable()
return moodImages.icon(forMood: self)
}
var graphic: Image {
switch self {
case .horrible:
return Image("HorribleGraphic", bundle: .main)
case .bad:
@@ -91,6 +92,7 @@ enum Mood: Int {
return Image("MissingGraphic", bundle: .main)
}
}
#endif
}
extension Mood: Identifiable {