Skip to content

Commit

Permalink
Add remove cache method
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Apr 24, 2023
1 parent fc34d95 commit 436128e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/ParseCareKit/PCKUtility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ public class PCKUtility {
PCKOutcome.getDecoder()
}

/// Remove ParseCareKit cache from device.
public class func removeCache() {
UserDefaults.standard.removeObject(forKey: ParseCareKitConstants.defaultACL)
UserDefaults.standard.synchronize()
}

/// Get the default ACL for `ParseCareKit` objects.
public class func getDefaultACL() -> ParseACL? {
guard let aclString = UserDefaults.standard.value(forKey: ParseCareKitConstants.defaultACL) as? String,
Expand Down

0 comments on commit 436128e

Please sign in to comment.