core-data

storing in coredata from webservices.

Hello everybody. can nybody give me an example which will explain the process of storing the data in coredata which is received from webservice. i dont want to use sqlite DB. perhaps a link which demonstrates this kind of example. ...

CoreData customize mapping model

Hi, I have a problem mapping the following situation from v1 to v2 of a core data model. In v1 of the model I had an entity named book with an attribute author. There I saved the first and last name of the author and even first and last names of several authors. Very poor design I know, but that's how it was. In v2 of the model I made...

Debugging NSFetchedResultsController

Hi guys, I've come into a strange situation with my NSFetchedResultsController. I've set it up with a predicate, and the sqlite3 table contains no entries when the app is loaded. Yet my controller sais that the one section in it contains two rows! One section is fine: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {...

NSFetchedResultsController Crashes in 3.0, works fine in 3.1

I have this code, basically copied from Apple's example: - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { id <NSFetchedResultsSectionInfo> sectionInfo = [[[[AppDelegate getAppDelegate] myFetchedResultsController] sections] objectAtIndex:section]; return [sectionInfo numberOfObjects]; } O...

Looking for data set to text FULLTEXT style searches on

Hi, I am looking for a corups of text to run some trial fulltext style data searches across. Either something I can download, or a system that generates it. Something a bit more random would be better e.g. 1,000,000 wikipedia articles in a format easy to insert into a 2 column database (id, text). Any ideas or suggestions? ...

Core Data Migration: Extracting fields to an abstract entity child

I have a migration where I'm moving fields from one entity into another entity which is a child of an abstract entity. My model has an entity, Thing, which is 1->M to an abstract entity, AbstractWidget, which is the parent for NewStuff. Something like this: +-------+ +----------------+ +----------+ | Thing |<--->>| AbstractWidge...

Core Data store disappears when app is removed from task list in 4.0

Under 4.0, my iOS application which uses Core Data loses all stored data when the application is suspended and subsequently removed from the background task list. Data persists fine between suspensions, but when the app is killed, there is no data on relaunch. Under 3.1, data persisted just fine between quits/relaunches of the app. Do...

NSObjectInaccessibleException - CoreData could not fulfill a fault

My iPhone application crashes when and I do not know how to resolve it. I have a secondary thread that does some cleanup (deletes objects). This cleanup is done on a second NSManagedObjectContext as apple recommend when doing stuff in another thread. When the cleanup is finished I merge the two contexts. My problem is that my applic...

Why is saving these images to core data taking 17 sec + on the iPhone?

Hi all - I have been working with Apple's iPhone CoreDateRecipes sample code to learn more about tableviews and core data. I have coded my own test app based off of that sample, and it works well except for one thing. When I choose a photo for the 'recipe', no matter if it is from the camera or the library, when I hit "Done" to leave e...

Core Data migration: File Exists

I am getting the following error from some users while performing a lightweight Core Data migration on iPhone: { NSUnderlyingError = Error Domain=NSPOSIXErrorDomain Code=17 UserInfo=0x2991d0 "Operation could not be completed. File exists"; destinationURL = file://localhost/var/mobile/Applications/AEFD8CE2-0AF6-4227-AB84-73E2F5D83F26/Doc...

How to Store lots of text in Core Data

This is a design questions, so multiple ideas will be fine. In my iPhone app, I keep track of Multiple players' life, which can increase and decrease over time. After the game is done, I want to be able to show them their life throughout the game, so they can see how they did. Now, this will also be stored in Core Data, so they can lo...

CoreData NSPredicate with many-to-many relationship

I have modeled a Person/Tag relationship. It's a many to many relationship; a person can have multiple tags and a tag can be associated to multiple people. I am trying to run a query to see get a list of people, that have been tagged with EVERY tag of a set of tags. For Example: Every person that has been tagged with 'FOO' and 'BAR'. ...

iOS 4 Core Data... any changes with multitasking?

I have a question, i carefully went through and thoroughly understood the tutorial at http://developer.apple.com/iPhone/library/documentation/DataManagement/Conceptual/iPhoneCoreData01/Articles/01_StartingOut.html#//apple_ref/doc/uid/TP40008305-CH105-SW1 for iOS Core Data. The issue was that when i coded everything and run on iOS 4 with...

Problem with Core Data, protocols, and readwrite vs. readonly property declarations

I'm running into an odd quirk involving Core Data, a declared protocol, and perhaps the LLVM 1.5 compiler. Here's the situation. I have a Core Data model that among others has two classes, IPContainer and IPEvent, with IPContainer being the parent entity of IPEvent. Each entity has a custom class in the project for it, created using m...

Illegally mutated the NSFetchedResultsController's fetch request

I'm getting the following exception is thrown under iOS 4.0 but not under 3.0 using core data. I'm populating a tableview controller with data from a core data store. Then drilling down on a row and requesting the details for that row and passing them onto a detail view. FATAL ERROR: The persistent cache of section information does not...

iPhone core data upsert from downloaded sqlite

I want to introduce the ability for the my core-data app to download a NEW sqlite file and update its stored data. Note the data model is not changing. At first I am not worrying about user changes to the stored data, and simply want to overwrite it. I am finding the only way the stored data is updating is to change the name of the sq...

Core-Data: NSLog output Does Not Show "Fields"

Hello, I don't understand the output of NSLog for the array returned by a NSFetchRequest. I'm reading my database and placing the contents in an array, looping through the array and then outputting the contents with NSLog. I don't quite understand the output in the log file. Code below: -(void)createXMLFeed{ //Fetch details from ...

Core Data - Unique Values Within a Scope

Hi all, I am new to Core Data and am trying to figure out how to set up a validation. I am tracking apartment buildings, where each Building entity has one or more Apartment entities. Each Apartment has a unitNumber property, which is unique within the scope of a Building. There could be multiple Unit records with an identical value ...

Using KVO with custom UITableViewCell and CoreData

I've read over a ton of documentation and tutorials about KVO but I haven't found any that I've been able to abstract for my application. I have a table view that uses a custom UITableViewCell class to provide an interface for turning options on/off. The cell has a UISwitch that I would like to "bind" to my model's boolean properties. ...

Upload sqlite file to provisioned iPhone?

I have successfully downloaded an sqlite datafile from my testing app on my provisioned iPhone using the Xcode organizer. How might I upload an sqlite file to the iphone to replace the data store that I am using in my app? ...