In my core date in the entity name called Event and in that there is an attribute called "name". I want to fetch all the values of term from coredata to an nsarray. I used the below code and it is not working. Anybody please helpp.
NSFetchRequest *request = [[NSFetchRequest alloc] init];
[request setEntity:[NSEntityDescription entityFo...
Hi,
I don't know which is the most efficient way of organizing images downloaded from server. I will be downloading around 200 images on to my iPhone on request for download. Which is the most efficient way of organizing ? just dropping it as a file on the phone's memory or having it in sqlite (via coredata) after download ? which one i...
So I have a couple properties that are common across several of my Core Data entities. Notes, URL, etc.
I have a single view controller for editing this information, and I pass the Entity to it as a NSManagedObject
@property (nonatomic, retain) NSManagedObject *editedObject;
@property (nonatomic, retain) Thing *thing;
@property (nonato...
Hello,
I have a memory leak while using NSFetchedResultsController objectAtIndex:
The stack frame is as follow:
0 CoreFoundation __CFDataAllocate
1 CoreFoundation __CFDataInit
2 CoreData -[NSSQLCore _prepareResultsFromResultSet:usingFetchPlan:withMatchingRows:]
3 CoreData -[NSSQLCore _newRowsForFetchPlan:selectedBy:withArgu...
Is it wrong to use an NSFetchedResultsController purely for data management, i.e., without using it to feed a UITableView?
I have a to-many relationship in a Core Data iPhone app. Whenever data in that relationship changes, I need to perform a calculation which requires that data to be sorted. In Apple's standard Department/Employees ex...
I'm using CoreData (with SQLite as the store) in an iOS 4 iPhone application to store data that i initially retrieve from an xml file. My data model contains more than 15 entities and I am concerned about memory consumption since I saw CoreData creating all the NSManagedObject in memory to represent the object graph of my data model.
I p...
I am getting a memory leak when I add a sort descriptor to my Fetch Request in Core Data. If I comment out the NSSortDescriptor block it runs without a memory leak in Instruments.
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Pools" inManagedObjectConte...
Hello,
I'm just starting to use core data in my iphone app.
I have created my Entity (measure) with 2 property (date, value).
According to the tutos I'm reading, I then need to create an Array Controller in Interface Builder. The thing is... I cannot find it in IB. Is there something to configure to have this type of controller in the li...
Hi all,
I have a Rails background and am trying to muck through Core Data. How does Core Data handle complex :has_and_belongs_to_many =>, :through => relationships?
As an example, suppose you were modeling open source project contributions. You might set up a table structure such as:
Contributor Contribution P...
Just trying to get into the Core Data stuff and getting crossed up right off the bat. In my AppDelegate I have the following code:
- (NSManagedObjectModel *)managedObjectModel {
if (managedObjectModel_ != nil) {
return managedObjectModel_;
}
NSString *modelPath = [[NSBundle mainBundle] pathForResource:@"DataModel" ...
I try to program a Cocoa application with Core Data and the Sync Services framework,
it works quite well, but once I try to start the sync, i get the following exception:
>[NOTE: this exception originated in the server.]
can't register schema at /Users/sdk/Documents/Knoma/build/Release/Knoma.app/Contents/Resources/KnomaSchema.syncsche...
Hi everybody, I'm working on an ipad application that use coredata. It download information on a database that is on the web, and record them in coredata. The application is based on a split view. My problem was to make the download and the record of the data in background. Here is how I've done :
- I've create an NSOperation, that does ...
I have the following piece of code (that may be invoked multiple times or even at the same time because it is in response to some NSURLConnection didFinishLoading method) that should invoke the willSave method for every object registered in the context.
NSLog(@"Before save.");
NSLog(@"Object count: %d", [[managedObjectContext registered...
I am importing a good amount of data into my application using Core Data like so:
for (int i = 0; i < [items count]; i++)
{
Client *entity = (Client*) [NSEntityDescription insertNewObjectForEntityForName:@"Client" inManagedObjectContext:managedObjectContext];
[entity setCompanyName:[[items objectAtIndex:i] objectForKey:@"Compan...
I have re-created my iphone app project from scratch. I added my source and datamodel files into the new project. I have the new project compiling and working.
Now I notice that the app created by my new project is not 'compatible' with my old app. If I have an existing database on the device/simulator, the new app does not recognize...
I'm trying to create a set of dummy data to put into a program, and I was wondering what the best way to do that was.
...
I have an iPhone app that has a sqlLite Core Data model that is pre-loaded with default data. I want to enable the user to restore this default data if they have modified or deleted records from the model, while retaining any new records added to the model by the user.
The sqlLite database is copied to the users documents directory on f...
Hallo,
I am working on a Core Data app and have to do some filtering based on dates. I've run some testing and it appears that when comparing NSDates, Core Data is comparing the time component of the dates as well.
My code:
- (BOOL)hasSpeakersWithinDateRangeFrom:(NSDate *)startOfRange through:(NSDate *)endOfRange {
NSPredicate* d...
I have an iPhone app that uses sync services to sync its data with the desktop version, everything is working fine, except for the images.
On the iphone I store an image in the Documents Directory and the path to the file in core data. I set up a transient attribute "image" and checked the sync check box and assigned it as an identity ...
Trying to update an fetched object and getting 'unrecognized selector sent to instance' error whenever I try and set any property on the object, here is my code:
NSFetchRequest *request = [[NSFetchRequest alloc]init];
NSEntityDescription *entities = [NSEntityDescription entityForName:@"PurchaseOrderItem" inManagedObjectContext:managedOb...