core-data Questions
29
Solved
I'm using Core Data to locally persist results from a Web Services call. The web service returns the full object model for, let's say, "Cars" - could be about 2000 of them (and I can't make the Web...
Immitigable asked 5/9, 2009 at 15:29
1
I run into performance issues with the diffable data source when having a larger data set, around 22,000 items. I am surprised that applying the snapshot takes so much time when animation is ON. Se...
Gentility asked 25/8, 2021 at 11:33
4
Solved
Suppose I have a list of books stored in Core Data. I want to search for a book by it's primary key ID.
I know the sqlite file created by Core Data has an ID column in each table, but this doesn't ...
Explant asked 18/1, 2011 at 3:19
10
Solved
I read much about Core Data.. but what is an efficient way to make a count over an Entity-Type (like SQL can do with SELECT count(1) ...). Now I just solved this task with selecting all with NSFetc...
Tonsillectomy asked 15/7, 2009 at 21:47
5
Solved
I know that I can use @distinctUnionOfObjects to find something like the following in SQL:
SELECT a_value
FROM my_table
GROUP BY a_value;
What I'm looking for is all of the data returned in an a...
Brut asked 1/2, 2011 at 17:12
6
Solved
I am trying to observe individual NSManagedObject changes on NSManagedObjectContextWillSaveNotification:
- (void)managedObjectContextWillSave:(NSNotification *)notification
{
for (NSManagedObject...
Gadabout asked 10/10, 2014 at 7:13
3
I have a Core Data model with an entity generated into class Task. I am trying to get the Combine publisher objectWillChange from the NSManagedObject to send (automatically, without manual work), b...
5
Below is one of the requirements to use Core Data with Cloudkit in Apple's doc:
All relationships must be optional. Due to operation size limitations,
relationship changes may not be saved atomica...
13
Solved
I am duplicating an existing Objective-C TV Show app to a new Swift version using Xcode 6.1 and am having some issues with CoreData.
I have created a model of 4 entities, created their NSManagedOb...
Lymphocytosis asked 28/10, 2014 at 16:51
10
Solved
Unfortunately the new Core Data semantics make me crazy. My previous question had a clean code that didn't work because of incorrect auto generation of header files. Now I continue my work with del...
4
I'm deleting all objects from my Model, except certain objects which the user has interacted with.
After deleting I fetch those saved objects and update their information, from a JSON, and when I s...
Cromwell asked 26/1, 2015 at 15:10
5
Solved
I'm having some trouble getting my Core Data entities to play nice and order when using an UITableView.
I've been through a number of tutorials and other questions here on StackOverflow, but there...
Hildahildagard asked 30/10, 2009 at 5:54
3
Solved
How do you set the default value of a UUID attribute in the core data xcdatamodel.
if I set the attribute as non-optional it requires a default value.
in code I'd set it using UUID() to assign a va...
3
Solved
Ok I have a basic iPad app that asks for 5 search/filter criteria from the user. Based on this data, I need to go to my core data db, and pull out any managed objects that fit that criteria. It see...
Doubledealing asked 14/11, 2011 at 23:7
1
Solved
I thought there used to be a relationship graphs for Xcode at the right corner(As indicated by the orange rect). But it's missing for Xcode 14.
Does anyone knows where it goes? Or how could I get i...
4
I have a SwiftUI project with Core Data. The data model is a simple one-to-many and two primary views which each have a textfield at the top and a button to add a new item to the list view below. T...
Blaineblainey asked 30/3, 2020 at 20:13
6
Solved
I have two versions of my model Model001.xcdatamodel and Model002.xcdatamodel. These two are in the Model.xcdatamodeld bundle.
I also have a Model001to002.xcmappingmodel which is not part of the Mo...
Hagiocracy asked 8/10, 2012 at 13:16
3
Solved
Im facing issues with displaying my Core Data inside of SwiftUI because of relationships being Sets. What is the best way to go about displaying a many relationship set inside of a SwiftUI ForEach ...
2
Solved
I have two Entities that have a relationship like so...
I want to create a fetched property on the conversation to return the most recent message that belongs to it. I don't want to have to main...
4
Solved
The problem that I am having is that when I update a core data Asset object from a sheet view, the change is not reflected in the UI of the AssetListView. (Note that Inserting a new object from the...
2
Solved
I'm attempting to use an IN clause with an NSPredicate. I'm getting the following error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerStr...
Changeling asked 7/3, 2017 at 15:48
3
I'm trying to follow the MVVM pattern in swiftUI and I’m running into a problem with core data and fetch request. All of the videos I've seen and articles I have read on it, have a @FetchRequest in...
Canula asked 1/10, 2019 at 20:19
3
I am using CloudKit to store publicly available data and the new NSPersistentCloudKitContainer as part of my Core Data stack to store/sync private data.
When a user opens my app, they are in 1 of ...
Herra asked 20/4, 2020 at 5:32
3
Solved
I've been trying to use a custom migration policy in an application I'm putting together. So far migrations have worked from v1 -> v2 when using a mapping model. However, whenever I add a custom po...
1
Solved
Currently, we are using local CoreData with CloudKit feature, by using NSPersistentCloudKitContainer.
Why we enable persistent history tracking feature?
Due to the problem described at https://mcma...
© 2022 - 2024 — McMap. All rights reserved.