1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 06:40:32 +05:30
yattee/Model/CacheModel.swift

15 lines
427 B
Swift
Raw Normal View History

2022-11-10 22:41:28 +05:30
import Foundation
import SwiftyJSON
struct CacheModel {
static var shared = CacheModel()
static let bookmarksGroup = "group.stream.yattee.app.bookmarks"
2022-11-10 22:41:28 +05:30
let bookmarksDefaults = UserDefaults(suiteName: Self.bookmarksGroup)
2022-11-11 02:16:37 +05:30
func removeAll() {
guard let bookmarksDefaults else { return }
bookmarksDefaults.dictionaryRepresentation().keys.forEach(bookmarksDefaults.removeObject(forKey:))
2022-11-11 02:16:37 +05:30
}
2022-11-10 22:41:28 +05:30
}