diff --git a/apple/OmnivoreKit/Sources/App/Views/Profile/ManageAccountView.swift b/apple/OmnivoreKit/Sources/App/Views/Profile/ManageAccountView.swift index 940c5059c..e3db2601e 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Profile/ManageAccountView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Profile/ManageAccountView.swift @@ -37,6 +37,12 @@ struct ManageAccountView: View { }, label: { Text("Delete Account") } ) + Button( + action: { + dataService.resetCoreData() + }, + label: { Text("Reset Data Cache") } + ) .alert(isPresented: $showDeleteAccountConfirmation) { Alert( title: Text("Are you sure you want to delete your account? This action can't be undone."), diff --git a/apple/OmnivoreKit/Sources/Services/DataService/DataService.swift b/apple/OmnivoreKit/Sources/Services/DataService/DataService.swift index 1d65dd84e..c05cb576c 100644 --- a/apple/OmnivoreKit/Sources/Services/DataService/DataService.swift +++ b/apple/OmnivoreKit/Sources/Services/DataService/DataService.swift @@ -95,7 +95,7 @@ public final class DataService: ObservableObject { } } - func resetCoreData() { + public func resetCoreData() { UserDefaults.standard.set( DateFormatter.formatterISO8601.string(from: Date(timeIntervalSinceReferenceDate: 0)), forKey: UserDefaultKey.lastItemSyncTime.rawValue