Sorting a large number of core data entities
I have a Song entity in Core data and each of them has an index attribute of type integer. I am expecting a large number of song entities and want to maintain order.
Check content of CoreData & SwiftData storage
I have a base swift project being configured to persist data in SwiftData and sync through CloudKit. While app is running, how can I check the content of Db(as it’s salute under the hood)? What is the way to check the storage path?
How to rollback saved changes made to the persistent store?
The user is able to select audio files that they want to add to their playlist. Their audio file library may contain 1000 to 100000 songs.
How to handle many entities in managed object context and save them only when necessary?
The user in my app can create multiple “Song” entities and add to a playlist in the range of 10k to 100k.
High memory usage when using a temporary large array to store user selected items for NSBatchInsertRequest Core Data
The selected items are from a SwiftUI list view. User taps on a row to add a song.
Temporarily store a large array of user selected items
The user can add about 10k to a million songs to a playlist and I want to perform a batch insert request only once the user confirms by pressing “Done” in batches.
Core Data Heavyweight migration accessing entities from a relationship
There’s is a severe lack in documentation regarding heavyweight migration and apple docs is extremely lacklustre.
Custom NSEntityMigrationPolicy subclass methods never gets called during heavyweight migration core data
I have a Playlist entity and Song entity. They have a one to many relationship where one playlist contains many songs. I want to remove the relationship and instead add a new attribute called playlistId of type UUID and assign the playlist Id to it during migration.
Custom NSEntityMigrationPolicy subclass methods never called during heavyweight migration core data
I have a Playlist entity and Song entity. They have a one to many relationship where one playlist contains many songs. I want to remove the relationship and instead add a new attribute called playlistId of type UUID.
NSBatchInsertRequest: Handling one-to-many relationship
In my app, an AudioFile has a one to many relationship with UpNextItem. I realised that NSBatchInsertRequest can’t handle relationships at all which is a huge drawback.