Fix build errors, resolve all warnings, and improve code quality
Widget Extension Fixes: - Create standalone WidgetDataProvider for widget data isolation - Add WIDGET_EXTENSION compiler flag for conditional compilation - Fix DataController references in widget-shared files - Sync widget version numbers with main app (23, 1.0.2) - Add WidgetBackground color to asset catalog Warning Resolutions: - Fix UIScreen.main deprecation in BGView and SharingListView - Fix Text '+' concatenation deprecation in PurchaseButtonView and SettingsTabView - Fix exhaustive switch in BiometricAuthManager (add .none case) - Fix var to let in ExportService (3 instances) - Fix unused result warning in NoteEditorView - Fix ForEach duplicate ID warnings in MonthView and YearView Code Quality Improvements: - Wrap bypassSubscription in #if DEBUG for security - Rename StupidAssCustomWidgetObservableObject to CustomWidgetStateViewModel - Add @MainActor to IconViewModel - Replace fatalError with graceful fallback in SharedModelContainer - Add [weak self] to closures in DayViewViewModel - Add OSLog-based AppLogger for production logging - Add ImageCache with NSCache for memory efficiency - Add AccessibilityHelpers with Reduce Motion support - Create DataControllerProtocol for dependency injection - Update .gitignore with secrets exclusions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
34
Shared/Services/AppLogger.swift
Normal file
34
Shared/Services/AppLogger.swift
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// AppLogger.swift
|
||||
// Feels
|
||||
//
|
||||
// Centralized logging using OSLog for production-ready logging.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import os.log
|
||||
|
||||
/// Centralized logging utility using OSLog
|
||||
enum AppLogger {
|
||||
// MARK: - Loggers by Category
|
||||
|
||||
static let general = Logger(subsystem: subsystem, category: "General")
|
||||
static let iap = Logger(subsystem: subsystem, category: "IAP")
|
||||
static let healthKit = Logger(subsystem: subsystem, category: "HealthKit")
|
||||
static let liveActivity = Logger(subsystem: subsystem, category: "LiveActivity")
|
||||
static let notifications = Logger(subsystem: subsystem, category: "Notifications")
|
||||
static let photos = Logger(subsystem: subsystem, category: "Photos")
|
||||
static let export = Logger(subsystem: subsystem, category: "Export")
|
||||
static let settings = Logger(subsystem: subsystem, category: "Settings")
|
||||
static let biometrics = Logger(subsystem: subsystem, category: "Biometrics")
|
||||
static let ai = Logger(subsystem: subsystem, category: "AI")
|
||||
static let events = Logger(subsystem: subsystem, category: "Events")
|
||||
static let userDefaults = Logger(subsystem: subsystem, category: "UserDefaults")
|
||||
static let backgroundTasks = Logger(subsystem: subsystem, category: "BackgroundTasks")
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private static var subsystem: String {
|
||||
Bundle.main.bundleIdentifier ?? "com.tt.ifeel"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user