3lvis / Sync

JSON to Core Data and back. Swift Core Data Sync.
MIT License
2.55k stars 263 forks source link

Doubt about load initial data on Ipad. #572

Closed mcezzare closed 4 years ago

mcezzare commented 4 years ago

Hy, in first, thanks for the great Job. Great library to work with CoreData. I have an app that loads initial data from local json installed with bundle, and at ipods and iphones work perfectly with the following code called in AppDelegate

self.dataStack.sync(json, inEntityNamed: NameOfEntity.entity().name!) { error in
                completion(.success)
            }

But on Ipad on load initial data it crashes.

2019-12-19 13:36:33.296908-0300 APPNAME[367:13694] [error] error: No NSEntityDescriptions in any model claim the NSManagedObject subclass 'NameOfEntity' so +entity is confused. Have you loaded your NSManagedObjectModel yet ? CoreData: error: No NSEntityDescriptions in any model claim the NSManagedObject subclass 'NameOfEntity' so +entity is confused. Have you loaded your NSManagedObjectModel yet ?

Is there any way to check if the model is already installed before perform the sync operation ?

Thanks

3lvis commented 4 years ago

Thanks for your support in this library. It has been a while since I used CoreData in any of my projects and it's hard for me to maintain this library. If you have been part of the Sync contributors group and want to take ownership of the library let me know to elvisnunez@me.com. For now, I'll be archiving this library.