As simple as possible: I have a very simple Excel spreadsheet with just over 1k records. I want to use this as a static datasource for an iPhone application.
What's the best plan of attack?
Possibilities in my mind:
1) Reading the XLS directly as a data source: is there an Obj-C lib for this?
2) Converting the XLS to a format that Ob...
I am new to core data and before I was using sqlite.
I found SQLite is not efficient and since my application is using extensive database communication, I have to compile the statements. With all this running my application breaks giving memory warnings, sometimes its views sometimes gets blank in between. Is it because of using SQLite...
Hi,
I've got a Core Data managed object that has an attribute with a "Boolean" type.
In my header file I've got this:
@property (nonatomic, retain) NSNumber * includeInHistory;
and I'm using a @dynamic includeInHistory implementation
When interacting with an instance of this managed object before saving to disk, I've got something th...
I am (still) working on an iPhone program which uses SQLite3. I have managed to optimize the database writes as far as I can.
The problem I have now is that "END TRANSACTION" is killing me as it's taking very long. The journal file is usually about 50k which might be a problem, but I'd like to know your ideas.
I tried using "PRAGMA sy...
What are good practices for asynchronously pulling large amounts of XML from a RESTful service into a Core Data store, and from this store, populating a UITableView on the fly?
I'm thinking of using libxml2's xmlParseChunk() function to parse chunks of incoming XML and translate a node and its children into the relevant managed objects...
In my app, I have a NSDictionary whose keys should be instances of a subclass of NSManagedObject.
The problem, however, is that NSManagedObject does not implement the NSCopying protocol which means that no Core Data objects / instances of NSManagedObject can be used as dictionary keys even though the -[hash] method works fine for them....
I have a CSV file containing data.
I want to load it into a Core Data managed sqlite db.
I just ran one of the sample Core Data Xcode apps and noticed it created the db file.
I noticed table names all started with Z and the primary keys were stored in separate table so from this am I right in presuming that just importing the CSV data d...
I have an AccountCredential object which holds standard user credentials and then another object that holds several of these AccountCredential objects. When I model this in CoreData, I'd like to know if AccountCredential needs to have a relationship link back to Account for every instance it holds.
Would I set it up in CoreData as this...
I am working on a non-document-based Core Data application.
I would like changes to be saved as they happen. This is what the user expects in this type of application. It is also what Apple has implemented in iPhoto or iTunes.
A brute force approach would be to set up a timer to save frequently. The method triggered by the saving would...
I have a coredata based iphone app and have an Entity that has latitude and longtitude as properties. How can I return all my entities ordered by distance from the current location? I previosuly did this without coredata writing a sql query, but am new to coredata and can't figure it out. I would like to use the NSFetchedResultsControlle...
Hi,
I get a bunch of objects from core data and put them into an array, like this:
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"completed" ascending:YES];
NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil];
NSMutableArray *sortedIngredients = [[NSMutableArray alloc] initWi...
Hi all,
I'm trying to execute a fetch request against a Managed Object Context with a predicate that tests against a keypath that exists in some subclasses of an abstract class.
For example here is a part of the object model
Library::NSManagedObject
- AllMovies::to-many relationship->Movie
Movie::NSManagedObject (abstract)
- type:...
I cache some data from the server locally using core data. Mostly I have to update one or two records in local storage. But sometimes I have to clean my cache for some data type (and there are other data types that I don't want to clear). I don't see a good way to do it. It is clear that I can fetch all objects for given entity type, exp...
I've come across this issue in my application, and have reproduced it using Apple's CoreDataBooks codebase with 0 modifications to the code. The problem is if you make an edit to a managed object, and save the context, with the result being a section with only one row now having no rows, and a new section created with the resulting objec...
I'm developing an iphone app that uses Core Data with a SQLite data store and lots of images in the resource bundle. I want a "simple" way to obfuscate the file structure of the SQLite database and the image files to prevent the casual hacker/unscrupulous developer from gaining access to them. When the app is deployed, the database file ...
Hi, everyone.
I am working on an iPhone application but something strange happen. I think I can ask you for advice.
I implemented a TableView and a custom view as a create new object form. I make the custom view slide up when user tab 'Add' button in the tool bar in TableView like the code below:
- (void)slide_up_form:(id)sender {
...
I need a bit of help with KVO, I'm about half way there. What I'm trying to do is trigger a method when something in an Tree Controller changes.
So I 'm using this code to register as a KVO.
[theObject addObserver: self
forKeyPath: @"myKeyPath"
options: NSKeyValueObservingOptionNew
context: NUL...
Hi,
I have a tableview with recipe.
The user can add and remove recipe.
When a recipe is clicked, another tableview is pushed, and display the ingredients.
Same here, the user can add and remove ingredients.
There is a oneToMany relationship between recipe and ingredients.
Here is my challenge:
I want to display the number of i...
In a Core Data project, I've got two buttons on my interface (a table), one which edits the data about a person and saves it to the db, and one lets you visually fiddle around with the data without actually saving it to the db.
How do I 'detach' the core data object, so that it so it won't write data to the db? I've tried to write a new...
Hi there,
I'm fairly new to Objective C and Core Data and have a problem designing a case where players team up one-on-one and have multiple matches that end up with a specific result.
With MySQL, I would have a Player table (player primary key, name) and a match table (player A foreign key, player B foreign key, result).
Now how do I...