Skip to content

Commit 436128e

Browse files
committed
Add remove cache method
1 parent fc34d95 commit 436128e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/ParseCareKit/PCKUtility.swift

+6
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ public class PCKUtility {
139139
PCKOutcome.getDecoder()
140140
}
141141

142+
/// Remove ParseCareKit cache from device.
143+
public class func removeCache() {
144+
UserDefaults.standard.removeObject(forKey: ParseCareKitConstants.defaultACL)
145+
UserDefaults.standard.synchronize()
146+
}
147+
142148
/// Get the default ACL for `ParseCareKit` objects.
143149
public class func getDefaultACL() -> ParseACL? {
144150
guard let aclString = UserDefaults.standard.value(forKey: ParseCareKitConstants.defaultACL) as? String,

0 commit comments

Comments
 (0)