Two hopefully minor questions regarding CoreData that I've been unable to find answers to:
1) I have a faulted object. Accessing an attribute as a property is not firing the fault, accessing the same property via KVC IS firing the fault. Any idea why?
i.e. object.title returns nil and object is still faulted, but [object valueForKey:@"...
I have a RESTful server and need to create the client in a Cocoa app.
I have a model called Resource. When I GET /resources, my server returns all resources in JSON.
I have a model called Client that owns many resources.
The Client has an instance method -(NSMutableArray*)resources
An NSArrayController manages the resources. The firs...
The Xcode 4 preview is still very buggy when dealing with core data models and it has corrupted the diagram representing my model. The model itself still seems fine, but does anyone know a way of getting Xcode (3.2 or 4) to re-generate the diagram layout?
...
I am working on an iPhone app that uses CoreData(with SQLite) to stores some sensitive biographical data that is downloaded via a Restful Web Services for offline use in the device.
I am worried that the competition could pay a subscription and extract the .sql file via SSH with a jailbroken device, and make copies of the data that has...
I'm using CoreData in my lastest iPhone app.
I find it complex at the beginning but I guess this is the best choice when you need to store objects in an iPhone app (http://inessential.com/2010/02/26/on_switching_away_from_core_data).
Is there any best practices when using CoreData in an iPhone app ?
For example, I don't want all my cont...
Hello,
I'm getting the above error and have no idea where its happening. Is there any way to debug it. I've put in some breaks points already buts its not abending its not abending those areas.
Code below:
-(void)viewDidLoad
{
if (managedObjectContext == nil)
{
managedObjectContext = [(NewWorkoutViewC...
Hi,
I have to manage a table on a large database with over 20k records (the db size is 25MB). I use standard queries like SELECT\INSERT etc. programmatically using SQLITE framework. But the app on the Device is VERY VERY slow. When I tap the icon, the Default.png freezes for 10-20 seconds and the app crashes. When I run it on the simulat...
I am new to Core Data and trying to think of the simplest and / or most performant way to implement a tags feature for items in Core Data. I am still wrapping my head around the fundamental differences between core data and the sql server I am used to.
Has anyone done this? Or have any suggestions of a solid implementation for this? ...
Hi. I'm using Core Data to fetch news from the memory and I want to modify the unread attribute after the news is read.
Code:
//method called from within a UITableViewController
-(void) didCloseNews:(NSIndexPath*)indexPath{
//get the newsItem - NewsItem subclasses NSManagedObject
NewsItem* newsItem = [self.fetchedR...
Hi all,
I am learning core data and particularly working on aggregation.
Current what I want to do : count the number of records from the table which is in to-many relationship with inverse relationship on some criteria.
Currently I am doing this :
NSExpression *ex = [NSExpression expressionForFunction:@"count:"
...
I have an entity header and it has a attribute NSDictionary wich was declared transformable in model. Now I want to not sort the array of headers in fetchedRequestController. And passing nil or null object gives error. Please help its urgent.
Let me reframe from the last time : if i have an entity, with a transformable attribute headers...
I've seen tutorials in books and on websites that offer .sqlite files for download. The sqlite files are used for Core Data.
How do I get a .sqlite file FROM an app or core data store on TO my desktop?
...
Hi,
This is the code for toggleAddProject method, the Core Data code is almost the same as found in Apple's CoreDataBooks sample, however when I click the add button the app crashes with entityForName: could not locate an NSManagedObjectModel for entity name 'Project' on the line starting with newProjectController.project
-(IBAction)t...
Im a creating an app for my iPhone using coredata.
I have a viewcontroller with an object i want to save that object to my FavoriteViewController.
By clicking a button favorite I want my object to be save into the managedObjectContext but I'm getting the following error:
Terminating app due to uncaught exception 'NSInternalInconsisten...
Hi all,
I am starting to have a look at Core Data, as many claiming is the best way to persist data.
I have an already working project with its model and objects, the main purpose of the application is to encapsulate things as attributes (NString,NSObject, Custom Object..ecc) into one main class, give the ability to create many instanc...
In my app, I am trying to save and retrieval of an image in core data. I am able to save an image successfully after convention of UIimage into NSData, But when I am trying to get an image as NSData it shows output as given below,
case 1: When trying to display as a string from DB.
<Event: 0x5b5d610> (entity: Event; id: 0x5b5ce30 <x-...
I have some trouble with a core data project. I have a NSArrayController with NSManagedObjects in it, and + / - buttons. If i delete a object in the row after the file has been saved it works perfectly, but if I add a new object, and immediately delete it again (without changing any of the default values), i get an error:
Serious appli...
Hi all,
I am trying a cocoa application with core-data. The application contains an entity: UsefulUrl with attribute: url. The entered urls are displayed in table view.
I am able to insert, modify and delete the entered urls from table via cocoa bindings (NSArrayController).
Now,
I want to open the urls of selected
rows in bro...
This is the Core Data object model I am working with (I am a new user, so I can't post pictures directly):
http://i965.photobucket.com/albums/ae134/spindler77/Screenshot2010-07-26at112231AM.png
All I am trying to do right now is to populate a UITableView with the "className" of every myClass instance the user has created and saved.
My...
My iphone application uses Core Data and a SQLite database; versions are being tracked using SVN. Adding data to the database is not reflected in the application. I make sure I delete the project out of the simulator and that the new database is added as a file to the project. I suspect the data is being cached in another location.
Ple...