yattee/Model/CacheModel.swift

15 lines
427 B
Swift
Raw Normal View History

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