r/ObjectiveC • u/MiltsInit • Mar 24 '21
CoreData onto Device
hi Ive created an app that uses CoreData with 9 entities. It works fine in the simulator, (I can remove and reload the data as required) but now I want to get the app with its core data into my testing device (an iPad). I can get the app onto the device, but it doesn't bring the core data entities. Can anyone provide some steer on this? Any help welcome.
Thanks
3
Upvotes
2
u/MiltsInit Mar 25 '21
Hi - thank you both for your guidance. Ill try those approaches and see which works best. Ive essentially got two elements within the entities: a huge needed-from-launch data set that won't change and a smaller (though not insignificant) data set that will need updating as the app gets used.
1
u/nbneo Mar 24 '21
Do you mean the data model or the data itself (the sqlite file)?
2
u/Joe_Scotto Mar 24 '21
I'm going to assume what you're trying to do is define some "default" data that the device should have when you open the app for the first time.
The typical process for this is that you have some sort of helper service that will populate the model when the app launches. You could find the actual SQLite file that CoreData is managing and importing that but honestly it would be better to just have a helper so if you need to eventually change anything with the default model, you can easily.