Add Apple platform features and UX improvements
- Add HealthKit State of Mind sync for mood entries - Add Live Activity with streak display and rating time window - Add App Shortcuts/Siri integration for voice mood logging - Add TipKit hints for feature discovery - Add centralized MoodLogger for consistent side effects - Add reminder time setting in Settings with time picker - Fix duplicate notifications when changing reminder time - Fix Live Activity streak showing 0 when not yet rated today - Fix slow tap response in entry detail mood selection - Update widget timeline to refresh at rating time - Sync widgets when reminder time changes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import SwiftUI
|
||||
import SwiftData
|
||||
import BackgroundTasks
|
||||
import WidgetKit
|
||||
import TipKit
|
||||
|
||||
@main
|
||||
struct FeelsApp: App {
|
||||
@@ -18,6 +19,7 @@ struct FeelsApp: App {
|
||||
let dataController = DataController.shared
|
||||
@StateObject var iapManager = IAPManager()
|
||||
@StateObject var authManager = BiometricAuthManager()
|
||||
@StateObject var healthKitManager = HealthKitManager.shared
|
||||
@AppStorage(UserDefaultsStore.Keys.firstLaunchDate.rawValue, store: GroupUserDefaults.groupDefaults) private var firstLaunchDate = Date()
|
||||
@State private var showSubscriptionFromWidget = false
|
||||
|
||||
@@ -27,6 +29,12 @@ struct FeelsApp: App {
|
||||
BGTask.runFillInMissingDatesTask(task: task as! BGProcessingTask)
|
||||
}
|
||||
UNUserNotificationCenter.current().setBadgeCount(0)
|
||||
|
||||
// Configure TipKit
|
||||
TipsManager.shared.configure()
|
||||
|
||||
// Initialize Live Activity scheduler
|
||||
LiveActivityScheduler.shared.scheduleBasedOnCurrentTime()
|
||||
}
|
||||
|
||||
var body: some Scene {
|
||||
@@ -39,6 +47,7 @@ struct FeelsApp: App {
|
||||
.modelContainer(dataController.container)
|
||||
.environmentObject(iapManager)
|
||||
.environmentObject(authManager)
|
||||
.environmentObject(healthKitManager)
|
||||
.sheet(isPresented: $showSubscriptionFromWidget) {
|
||||
FeelsSubscriptionStoreView()
|
||||
.environmentObject(iapManager)
|
||||
@@ -75,6 +84,8 @@ struct FeelsApp: App {
|
||||
await authManager.authenticate()
|
||||
}
|
||||
}
|
||||
// Reschedule Live Activity when app becomes active
|
||||
LiveActivityScheduler.shared.scheduleBasedOnCurrentTime()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user