Complete rename across all bundle IDs, App Groups, CloudKit containers, StoreKit product IDs, data store filenames, URL schemes, logger subsystems, Swift identifiers, user-facing strings (7 languages), file names, directory names, Xcode project, schemes, assets, and documentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
954 B
Swift
37 lines
954 B
Swift
//
|
|
// ReflectMoodControlWidget.swift
|
|
// ReflectWidget
|
|
//
|
|
// Control Center widget for quick mood logging
|
|
//
|
|
|
|
import WidgetKit
|
|
import SwiftUI
|
|
import AppIntents
|
|
|
|
// MARK: - Control Center Widget
|
|
|
|
struct ReflectMoodControlWidget: ControlWidget {
|
|
var body: some ControlWidgetConfiguration {
|
|
StaticControlConfiguration(kind: "ReflectMoodControl") {
|
|
ControlWidgetButton(action: OpenReflectIntent()) {
|
|
Label("Log Mood", systemImage: "face.smiling")
|
|
}
|
|
}
|
|
.displayName("Log Mood")
|
|
.description("Open Reflect to log your mood")
|
|
}
|
|
}
|
|
|
|
// MARK: - Open App Intent
|
|
|
|
struct OpenReflectIntent: AppIntent {
|
|
static var title: LocalizedStringResource = "Open Reflect"
|
|
static var description = IntentDescription("Open the Reflect app to log your mood")
|
|
static var openAppWhenRun: Bool = true
|
|
|
|
func perform() async throws -> some IntentResult {
|
|
return .result()
|
|
}
|
|
}
|