Add weather feature with WeatherKit integration for mood entries
Fetch and display weather data (temp, condition, hi/lo, humidity) when users log a mood. Weather is stored as JSON on MoodEntryModel and shown as a card in EntryDetailView. Premium-gated with location permission prompt. Includes BGTask retry for failed fetches and full analytics. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,10 @@ struct ReflectApp: App {
|
||||
guard let processingTask = task as? BGProcessingTask else { return }
|
||||
BGTask.runFillInMissingDatesTask(task: processingTask)
|
||||
}
|
||||
BGTaskScheduler.shared.register(forTaskWithIdentifier: BGTask.weatherRetryID, using: nil) { task in
|
||||
guard let processingTask = task as? BGProcessingTask else { return }
|
||||
BGTask.runWeatherRetryTask(task: processingTask)
|
||||
}
|
||||
UNUserNotificationCenter.current().setBadgeCount(0)
|
||||
|
||||
// Reset tips session on app launch
|
||||
|
||||
Reference in New Issue
Block a user