1.2.0: report non-fatal errors to Crashlytics across key error paths
CrashlyticsService was wired only for the is_premium custom key. Route the swallowed errors in the main catch blocks through CrashlyticsService.record with a context tag, so non-fatals show up in Firebase (StoreKit load/purchase/ restore, calendar access/create/update/delete, reset-all-data, onboarding save). Debug prints kept. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BkanrydYtrme8wipTzWssG
This commit is contained in:
@@ -172,6 +172,7 @@ final class OnboardingViewModel: ObservableObject {
|
||||
UserDefaults.standard.set(true, forKey: Self.pendingPremiumPromptKey)
|
||||
return true
|
||||
} catch {
|
||||
CrashlyticsService.record(error, context: "onboarding_save")
|
||||
print("Onboarding save failed: \(error)")
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -97,12 +97,14 @@ final class SettingsViewModel: ObservableObject {
|
||||
UserDefaults.standard.set(false, forKey: OnboardingViewModel.pendingPremiumPromptKey)
|
||||
try context.save()
|
||||
} catch {
|
||||
CrashlyticsService.record(error, context: "reset_all_data")
|
||||
#if DEBUG
|
||||
print("Failed to complete reset all data: \(error)")
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
CrashlyticsService.record(error, context: "reset_all_data_start")
|
||||
#if DEBUG
|
||||
print("Failed to start reset all data: \(error)")
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user