Harden iOS app: fix concurrency, animations, formatters, privacy, and logging
- Eliminate NumberFormatters shared singleton data race; use local formatters - Add reduceMotion checks to empty-state animations in 3 list views - Wrap 68+ print() statements in #if DEBUG across push notification code - Remove redundant .receive(on: DispatchQueue.main) in SubscriptionCache - Remove redundant initializeLookups() call from iOSApp.init() - Clean up StoreKitManager Task capture in listenForTransactions() - Add memory warning observer to AuthenticatedImage cache - Cache parseContent result in UpgradePromptView init - Add DiskSpace and FileTimestamp API declarations to Privacy Manifest - Add FIXME for analytics debug/production API key separation - Use static formatter in PropertyHeaderCard Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -61,7 +61,15 @@ enum ThemeID: String, CaseIterable, Codable {
|
||||
|
||||
// MARK: - Shared App Group UserDefaults
|
||||
private let appGroupID = "group.com.tt.casera.CaseraDev"
|
||||
private let sharedDefaults = UserDefaults(suiteName: appGroupID) ?? UserDefaults.standard
|
||||
private let sharedDefaults: UserDefaults = {
|
||||
guard let defaults = UserDefaults(suiteName: appGroupID) else {
|
||||
#if DEBUG
|
||||
assertionFailure("App Group '\(appGroupID)' not configured — theme won't sync to widgets")
|
||||
#endif
|
||||
return UserDefaults.standard
|
||||
}
|
||||
return defaults
|
||||
}()
|
||||
|
||||
// MARK: - Theme Manager
|
||||
#if WIDGET_EXTENSION
|
||||
@@ -84,6 +92,7 @@ class ThemeManager {
|
||||
}
|
||||
#else
|
||||
// Full ThemeManager for main app with ObservableObject support
|
||||
@MainActor
|
||||
class ThemeManager: ObservableObject {
|
||||
static let shared = ThemeManager()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user