Relative Content

Tag Archive for swiftcore-data

How to ensure only one instance of a core data entity?

I have an entity called UpNextQueue. It has a one to many relationship with UpNextItem through a property called upNextItems where the queue can have over 10k items. However my app will strictly have only have one up next queue at any given time. How do I enforce this with good design of my code? I have read numerous threads on how doing as such is bad design and I’m unsure on how to handle my use case as I’m unable to find a thread with a similar problem to mine.

How to store large arrays in core data?

I have an entity called AudioFile in my core data database. It has attributes like name, artist, file extension and more which are all string. An audio file is unique as long as both name and file extension are different.