Clean-Swift/CleanStore

CoreData not working?

felipecaldas opened this issue · 1 comments

Hi Ray,

I am using your code as basis for my own and struggling here with CoreData. My CoreData DataStore class, has the very same init() method with everything you have in your CleanStore project and the AppDelegate has no references to CoreData. The init() method is invoked and throws no exception. I can query the DB, insert and update. No exceptions thrown. But, the data is not actually inserted in the DB.

Have you experienced that? Thanks

My AppDelegate injects the repository:

let container = Container() { c in
c.register(UserDataStore.self) { _ in ParseRepository() } //If I ever want to change Parse to something else (example, Firebase) then this is the place I change to a new repo
c.register(GenericRepository.self) { r in
GenericRepository(_userDataStore: r.resolve(UserDataStore.self)!)
}
}

not sure if this has to do with anything.