iam trying to create object and insert this data inside it using CoreStore but it gives me an error
let dataStack: DataStack = {
let dataStack = DataStack(xcodeModelName: "ModelName")
do {
try dataStack.addStorageAndWait(SQLiteStore(fileURL: fileURL, configuration: "Default", localStorageOptions: .
recreateStoreOnModelMismatch))
} catch let error {
print("Cannot set up database storage: \(error)")
}
return dataStack
}()
dataStack.perform(
asynchronous: { (transaction) -> Void in
let user = transaction.create(Into<Heroes>()) // undeclared type "Heros"
user.time = self.timest
user.token = self.qrrec
user.type = "QR"
user.midass = self.midaaas
}, completion: { (result) -> Void in
switch result {
case .success: print("success!")
case .failure(let error): print(error)
}
})
The error happen let user = transaction.create(Into()) undeclared type "Heros"
Any suggestion ?
thanks