I've updated the model of an existing iPhone app in some simple ways (remove attribute, add attribute, remove index), and can use automatic lightweight migration to migrate the persistent store.
Due to the typical size of the data set, the processing time is not insignificant, and warrants feedback for the user.
NSMigrationManager prov...
I'm working on my first Core Data project (on iPhone) and am really liking it. Core Data is cool stuff.
I am, however, running into a design difficulty that I'm not sure how to solve, although I imagine it's a fairly common situation. It concerns the data model.
For the sake of clarity, I'll use an imaginary football game app as an e...
What's the difference between get elements from Core Data with FetchResultController or ManagedObjectContext??
1) FetchResultController
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
[fetchRequest setEntity:[NSEntityDescription entityForName:@"Item" inManagedObjectContext: managedObjectContext]];
NSSortDescriptor *sor...
Hi,
I Know how to use core data with UITableview but how can I use the NSFetchedController to get calculated fields. Is there an example I can follow? LIke i want to go through all the NSManagedObjects and then add its "mark" field but can this be done in easier way or do I have to do it all manually.
Thanks
...
I have two entities: Patient and Job. Patient has a to-many relationship to Job called 'jobs' and Job has a to-one relationship to Patient called 'patient'. Job has attributes called 'dueDate' (Date) and 'completed' (BOOL) and Patient has attributes 'firstName' and 'lastName' (both Strings).
I am trying to create a fetch request / predi...
Hi,
I'm trying to use Doxygen with Xcode. I followed the Apple tutorial. After several mistakes, I builded the project and generated the docs. I discovered that if you save the doxygen.config from Doxygen and you use space " " in the directory name you will have problem and others things.
But there is one last problem:
./search/searc...
My model is setup so Business has many clients, Client has one business. Inverse relationship is setup in the mom file.
I have a unit test like this:
- (void)testNewClientFromBusiness
{
PTBusiness *business = [modelController newBusiness];
STAssertTrue([[business clients] count] == 0, @"is actually %d", [[business clients] coun...
Hi,
I seem to recall that it's possible to return the resulting object count from an NSPredicate in CoreData without actually performing a fetch, but I can't find any reference to this.
Can someone confirm that I wasn't dreaming (sad dream to have!), and would this be safe to do in another thread?
Thanks
Andy
...
What is the right way to build iPhone core data for this SMS like app (with location)?
- I want to represent an entity of
conversation with
"profile1"
"profile2"
that heritage from a profile entity,
and a message entity with:
"to"
"from"
"body"
where the "to" and "from" are equal to "profile1" and/or "profile2" ...
Hi,
I'm trying to follow Marcus Zarra in his book 'Core Data'. In the book, he makes a small sample application, but it doesn't give much help when things don't work out...
He starts out by visually designing three entities, and then adding array controllers for each entity to the main nib.
Second, he adds a tableview and some other vi...
This is a better-focused version of an earlier question that touches upon an entirely different subject from before.
I am working on a Cocoa Core Data application with multiple threads. There is a Song and Artist; every Song has an Artist relation. There is a delegate code file not cited here; it more or less looks like the template XCo...
All of the data on my application is pulled through an API via JSON. The nature of a good percentage of this data is that it doesn't change very often. So to go and make JSON requests to get a list of data that doesn't change much didn't seem all that appealing.
I'm looking for the most sensible option to have this JSON saved onto the ...
This might be a stupid question, but I was wondering whether or not you can use the Core Data libraries on Linux at all? I'm planning how to build the server side of an iPhone app that I'm working on, and have found that you can use PyObjC to get access to Core Data in a Python environment, e.g. use Core Data in a TurboGears web applica...
I'm trying to model a Person/Team relationship. It's a many to many relationship since a person can belong to multiple teams and a team can have multiple people. As suggested by the doc I created an intermediate entity called TeamMember. I am now trying to run a query to see if I have a list of people, whether a pre-existing Team already...
Hello,
I have an entity in core data that has 2 Attributes. One that is a string called "name", and another one that is a string called "message". I need a method to create text files for all the attributes that the user has added. I wan't the files names to be the name attribute and the contents to be the message attribute. If anyone ...
HI,
I am developing an application in which i have to get data from .xls file. I am fairly new to iPhone development so any pointers in direction to getting started will be very much helpful.
The steps that i am thinking are :
1) First i need to convert .xls to .csv Format.
2)Import the data from .csv file to SQlite Databse or Core...
Hi,
I am using a UIDatepicker with only "Time", I save the time in a NSDate object type, however when I try to store the Object in core data I get an error saying its not a NSDate type...
tt = [pickerTime date];
[myObject setValue:tt forKey:@"time"];
Thanks,
...
Hi guys,
I've got the scenario with two NSManagedObjects, Arm and Person. Between them is a many-to-one relationship Person.arms and inverse Arm.owner.
I'd like to write a simple NSPredicate where I've got the NSManagedObject *arm and I'd like to fetch the NSManagedObject *person that this arm belongs to. I could make a textual repres...
I have tab bar navigation application and The problem is that in my root controller I am able to set its NSContextManagedObject to the app delegates...However when I try to do the same on the other controller the application freezes...
This only happens in the ViewDidLoad but thats where I need to set it so I can fetch the data
Im acce...
Hi.I am making an app that it takes photos from web site for some Username and shows it on UITable with username then when clicking user name it shows photos for this user and then clicking to name of photo it shows full screen photo.
My question is I am using NSData to get photos from internet.Am I have to save also those data to CoreD...