All Questions
Tagged with objective-c core-data
8,754
questions
0
votes
1
answer
27
views
Override NSManagedObject getter/setter to modify data
I have an NSManagedObject class that stores, among other things, a JSON string that comes from a WkWebView form. The form in the web view allows the user to add images to the form; when the form is ...
0
votes
1
answer
59
views
How do I create a simple database table of attributes of NSManagedObjects using Core Data and Objective-C?
I am trying to create a simple database table of records using Core Data and Objective-C. I understand that instances of NSManagedObject is what I store those records in, but how many entity records ...
3
votes
1
answer
35
views
Why does my app hang when breakpoints are disabled?
I have an app that uses several ManagedObjectContexts.
I am using Objective-C.
One MOC is created with NSPrivateQueueConcurrencyType. The rest are created with NSMainQueueConcurrencyType.
I am using [...
1
vote
0
answers
31
views
CoreData sorting is treating single straight quote and single smart quote as the same, how to treat them differently?
I've got a CoreData database and I'm fetching a list of Animals from it, sorted by a namesortable field. But namesortables that start with ' and with ` are being treated as if they are the same and ...
0
votes
0
answers
78
views
CoreData crash NSTaggedDate objectForKey
I'm using CoreData in my iOS application, I have a function that creates NSManagedObjectContext per thread:
var contextDict = [Thread:NSManagedObjectContext]()
var context:NSManagedObjectContext{
...
-1
votes
2
answers
196
views
Figuring out what causing a Core Data fault
I keep hitting Core Data faults when updating and deleting objects and Id like to understand why. The logic essentially fetches the entities, updates a few fields and saves. No faults are hit. The ...
0
votes
0
answers
69
views
how to downcase rootviewcontroller from appdelegate to define NSPersistentContainer in Objective C
I'm trying to follow the steps Setting Up a Core Data Stack documentation for setting up Core Data using Objective-C but it appears to only show Swift implementation. The main view controller I have ...
0
votes
0
answers
55
views
Can you rename the coredata accessors without renaming the entire entity?
I am trying to get upload an archive of my app to App Store Connect and keep running into the issue of The app references non-public selectors core data site:developer.apple.com.
I have narrowed down ...
0
votes
1
answer
93
views
How to use NSBatchUpdateRequest with dynamic values
I have entity called "Student" which has column called "firstName" and "lastName". My Existing entity looks like this
firstName
lastName
Peter
Morgan
Adam
Hayden
...
0
votes
1
answer
72
views
Core Data crash: NSInvalidArgumentException keypath count not found in entity
+ (NSArray *)retrievePercent{
NSArray *percentResult = [NSArray arrayWithObjects:@"", nil];
NSFetchRequest *fetchRequest = [NTSmartRegionGPS MR_createFetchRequest];
NSString ...
-1
votes
1
answer
76
views
How to add default string to attribute during CoreData migration
I have a simple Coredata program for cataloging some data - coded in Objective-C. A new model version was created that has a new attribute. A mapping model has been created, it is not inferred. The ...
3
votes
1
answer
103
views
Sometime NSManagedobject object become fault when passing object from one controller to another, is there any way to pass object as a value type objC
First controller
OptiiMobileTaskDetailViewController *taskDetailVC = (OptiiMobileTaskDetailViewController *)segue.destinationViewController;
[taskDetailVC setTask:task];
Second Controller
-(void) ...
0
votes
1
answer
164
views
Is a self referential one-to-many Core Data relationship possible?
I’m learning to use Core Data and I have some ideas for modeling data. As someone trying to learn German, I’m making a log book of phrases and some context around them like the text’s language, a note,...
0
votes
1
answer
270
views
NSPredicate filter for less than OR nil
I want NSPredicate to give me back results for a keyPath that is either nil... or less than a given date. I'm using the NSPredicate for core data.
These are working correctly...
let endDatePredicate = ...
1
vote
1
answer
35
views
Adding value to NSObject key- Expression is not assignable
I’m trying to add a value I get back from an API call to an object in Objective-C. I get an error in Xcode saying “Expression is not assignable” and don’t understand why. In my carObj I have an object ...