You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using SugarRecord with Swift 3. Is it possible to delete all data (for example when user logs out) of core data? Not the models/entities but data in the models/entities?
My SugarRecordManager.swift
class SugarRecordManager
{
static let sharedInstance = SugarRecordManager()
private init(){
}
// Initializing CoreDataDefaultStorage
func coreDataStorage() -> CoreDataDefaultStorage {
let store = CoreDataStore.named("db")
let bundle = Bundle(for: type(of: self))
let model = CoreDataObjectModel.merged([bundle])
let defaultStorage = try! CoreDataDefaultStorage(store: store, model: model)
return defaultStorage
}
// other functions for fetching and storing objects
// want to write a function here to wipe out all data
}
The text was updated successfully, but these errors were encountered:
Using SugarRecord with Swift 3. Is it possible to delete all data (for example when user logs out) of core data? Not the models/entities but data in the models/entities?
My SugarRecordManager.swift
The text was updated successfully, but these errors were encountered: