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

@@ -27,16 +27,16 @@ enum EntryType: Int, Codable {
@Model
final class MoodEntryModel {
// Primary attributes
var forDate: Date
var moodValue: Int
var timestamp: Date
var weekDay: Int
var entryType: Int
// Primary attributes - CloudKit requires default values
var forDate: Date = Date()
var moodValue: Int = 0
var timestamp: Date = Date()
var weekDay: Int = 1
var entryType: Int = 0
// Metadata
var canEdit: Bool
var canDelete: Bool
// Metadata - CloudKit requires default values
var canEdit: Bool = true
var canDelete: Bool = true
// Journal & Media (NEW)
var notes: String?