Posts

Showing posts with the label core-data

Storing app data under one entity Core Data

Storing app data under one entity Core Data I am making an app where a string is shown, and then they have to pick the correct string from 4 options. I need to update a score, based on whether they get it right or wrong. Let's call the string that is shown to them: shownString For ease and efficiency, I am planning to have ONE core data entity and only store one object for that entity, which will be a transformable type, that is an array with nested arrays/tuples, that contains shownString and the score for every shown string that could come up in multiple choice. The reason I am doing it like this as opposed to storing individual objects for each word and score is because it will make it easier to update the object i.e. delete and add it back in again. I am fairly new to Core Data, so please could you tell me if there are any problems with this, or if you think it is a good/acceptable way that will work well then please also tell me. Thanks What's t...