core-data

is it possible to use more than one SQLite files in CoreData?

Hello fellow stackoverflow family members? I know it is un-efficient to create one extra sqlite table in iPhone CoreData system. (X) Currently, My app has one sqlite table but there are preset data to users to no need to waste parse time. But if I adding new entity in current structure of SQLite table, it wipes up the whole preset data...

CHCSVParser in the main thread

Hello all, This is a follow-up to a previous post regarding the CHCSVParser from Dave DeLong. In short, I am using the CHCSVParser to work with an extremely large CSV file and parse the lines into Core Data entities (on an iPhone). I've got the parser hooked up and working, and am now trying to display a progress indicator to the user...

How to model core-data relationship, one-to-one or one-to-many?

I have Customer object and Loan object. It is a one-to-many relationship (Customer <-->> Loan). Each loan has exactly 5 type of Payoff plans (exactly 5 and will not change for the next 100 years) for customer to select and to see the payment projection. Each Payoff plan consist of type, initial-payment, monthly-payment, interest, number-...

NSFetchedResultsController

Hi, I am working with a UITableView that gets its data from an NSFetchedResultsController. I would like to add a UISegmentedController to my navigation bar that would toggle the table between displaying all of the records and only the records where starred == YES. I have read some other SO posts indicating that one way to do this is t...

How to make Deep Copy of NSManagedObject in Core Data

I am trying to make a duplicate of an existing NSManagedObject and related sub-objects in Core Data. I can't seem to find an easy way to do this. I have an NSArrayController that is populated from a Core Data database. I want to take the object at the selectionIndex and make a deep copy, keeping it related to the same parent object an...

CoreData: deleteObject faults on relationships when nil.

We have a project that has two one to many relationships. We encounter a core data fault when we try to delete the parent object. This ONLY happens if the child relationships are empty. So for example: A project has many to-dos and messages. If we create a project and add a message and a to-do to it, and subsequently call deleteObject o...

Core Data: 3 table join?

I know Core Data is not a database and there are many differences. Is this one? In a database, I would commonly have the following A ->> B ->> C "A" has many "B" which has many "C" The query, "Give me all A's which have c.attr = 'X' is easily written like: select * from a, b, c where a.id = b.aid and b.id = c.bid and c.attr = 'X' ...

How export core data store from iphone to Mac?

I can full iphone core data in iphone test at my phone But i need this databases for all app copies I need copy full databases to app folders How? ...

Why my application installed from cydia can't access core data?

Hi! I wrote an application which uses sqllite via coredata. It works fine on simulator or being installed on a device from xcode. I need to provide a test version of application to some other people like ui designer or QA. I decided to use Cydia for this task. Although it installs fine it can't initialize persistentStoreCoordinator: add...

How can I find out if the iPhone user currently has a passcode set and encryption enabled?

I'm writing an iPhone application that requires its data to be encrypted. I've learned how to turn on encryption for files by setting the NSFileProtectionComplete attribute. I also know how to check the iPhone version to make sure they are running iOS 4.0 or better. What I've realized though, that if the user has not chosen a passcode a...

NSPredicate for to-many relationship, where a relationship (NSSet) must contain Entities defined in an NSArray

Given the following Core Data Model: -> : to-one releationship ->>: to-many relationship Entity A ->> Entity B Entity B -> A // each B belongs to exactly one A Entity B ->> B // a B can be related to other B's So in class A: @property (nonatomic, retain) NSSet *Bs; In class B: @property (nonatomic, retain) A *A; @propert...

How to retrive Core Data SQL store from Developer's App on the Developer's iPhone

I need a copy of the store that is saved as Core Data sqlite file inside a test app installed on my device. I know how to get files out of the the simulator at path: ~/Library/Application Support/iPhone Simulator/[Version]/Applications/[AppID]/Documents ...but i need get the .sqlite file from the app on the device itself. ...

How rewrite property in coredata?

How i can Check that property==nil ReWrite property For example NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Event1" inManagedObjectContext:app.managedObjectContext]; [fetchRequest setEntity:entity]; NSError *error; NSArray *...

CoreData - How to make an entity enforce parent-child relationships with itself?

I'm wanting to make a CoreData entity called "Employees", some "Employees" could have a line manager (or boss). In basic pseducode, it could be described as: emp_id (PRIMARY KEY) emp_name emp_parent_id (INT *but optional as some people may not have line managers*) Another example I could use is "articles" an Article could have a pare...

Create Tab bar application with Core Data enabled

Hi, I'm want to create a tab bar application with Core Data is enabled (like navigation based default apps) but it looks Xcode doesn't provide this option. Maybe I'm missing something but is it doable? (My application looks like the iPod application). ...

How to exclude properties from NSManagedObjectContextObjectsDidChangeNotification

Hey, I'm using CoreData in my application and depend on the NSManagedObjectContextObjectsDidChangeNotification. I have already subclassed NSManagedObject for all my Entities and created the properties and @dynamic accessors. Is it possible to exclude some properties of specific entities from the notification? If so, how would I do it? :...

Is there any data binding mechanism available for iOS?

In .NET I just do something like DataForm.Source = Object and then magic happens. Platform routes data changes from ui fileds to object properties, does validation and so on. Can I do something similar with Cocoa Touch and CoreData objects? ...

How delete attributes in core data?

And how check attributes or nil? ...

How do I print out a property of a Core Data element?

I'm trying to set a value and then return it using Core Data. This is what I`m doing right now : NSManagedObjectContext *context = [(AppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; NSManagedObject *newShot = [NSEntityDescription insertNewObjectForEntityForName:@"Shots" inManagedObjectContext:...

core data displaying to-many relationship data in second view controller

Hi, I am fairly new to this, so please bare with me, my core data model look like this 2 entities with the 1st TableViewController displaying the districts, and when user selected the district, it pushes to the 2nd view and display the schools in that district. I have the 1st TableViewController with the NSFetchedResultController setup...