I am working on my first iPhone application and I've hit a wall. I'm trying to develop a 'statistics' page for a three entity relationship. My entities are the following:
Department - Name, Address, Building, etc.
People - Name, Gender (BOOL), Phone, etc
If I have fetched a specific department how do I filter those results and only ret...
This one Also Resolved by myself.
Good answer would be,
New Edition App: make change the sqlite file name. check file exist, get the old edition app sqlite name value then remove, and add into that folder.
this is the best answer.
*New efficient answer
STEP 1: select .xcdatamodel file
STEP 2: Xcode -> Design -> Data Model -> Add Mode...
I would like to add a favorites tab to my iphone app that i am developing. I am using core data to populate a UITableView and would like in the detailed view to be able to add the selected item to the users favorites.
Would i go about this by adding the selected item to a new array?
I am very new to xcode and iphone programming so as...
I'm using core data and fetching the results successfully. I've few questions regarding core data
1. When I add a record, will it be added at the end or at the start of entity.
2. I'm using following code to fetch the data. Array is being populated with all the records. But they are not in the same order as I entered records into entity....
I am looking for a tutorial that shows how to populate a UITableView from core data, allowing to add records and delete them.
There are a few projects that I have found, but they are hard to follow without the steps to build them.
Anyone seen tutorials on this? Or better yet, videos?
...
I'm trying to find the oldest date in a particular attribute in Core Data. I've found an example in the Core Data Programming Guide that purports to do exactly that, but keep getting an unrecognized selected error when I run it.
My code (with only minimal changes from the Apple Example):
NSFetchRequest *request = [[NSFetchRequest allo...
This is my first project with Core Data, I followed the Event tutorial provided by Apple that helped me to understand the basic of core data in iPhone.
But now, working over my project, I've a problem adding data into my database.
When i create an object and set the data, if I try to get it back, the system returns me a strange sequenc...
Hi, I'm trying to get to know Core Data (I'm a noob at iPhone development) and in order to do this I'm trying to get an object from the fetchedresultscontroller and NSlog it's name (a property of the object). I tried to do it like this:
NSArray *ar = [NSArray arrayWithArray:[fetchedResultsController sections]];
Task *t = [ar objectAtInd...
I'm implementing core data in my iphone app. It has two entities.
Entity1: LatestData
Entity2: LatestDetailedData
LatestData has URL, publishedDate, heading
LatestDetailedData has URL, NewsDescription, PublishedDate, Author
Both entities have same URL for a record.
Both the entities are connected with inverse relation ship. And the rel...
Well, may be this question is silly, but I couldn't find a way (except programmatically).
I built a project (for iPhone OS 3.0) which uses Core Data.
The xcdatamodel file shows the schema description, but I want to see the data in tabular form (like the management studio for mssql server or phpmyadmin for mysql).
Is there any way (excep...
Hello,
I have an app which is a UITabBarController, I have defined two subviews
Both tabs have their Class attribute in the Identity Inspector set to UINavigationController.
Now i have managed to get this far with my coding after VERY LONG trials.
- (void)viewDidLoad {
[super viewDidLoad];
myAppDelegate *appDelegate = (myAppDelegat...
I need to update the tableview as soon as the content is pushed in core data database.
for this
AppDelegate.m contains following code
NSManagedObjectContext *moc = [self managedObjectContext];
NSFetchRequest *request = [[NSFetchRequest alloc] init];
[request setEntity:[NSEntityDescription entityForName:@"FeedItem" inManagedObjectCont...
Hello,
I have some data that I export into an XML file and put in a remote FTP Server.
I have to identified each object with a unique attribute, it doesn't matter wich is, but must be persistent always => it can never change.
I don't want to create a unique attribute, sequence, serial, etc.
I'm using the objectID but every time I use...
I implemented an as-you-type-searching (text search on single attribute) by fetching with performFetch: after each given character by the user. The performFetch: is running in a background thread to avoid keyboard freezes.
But while typing many useless fetches are started. A NSOperationQueue might be an option, but I wonder if there are...
I have an entity called Person and it has a relationship called participatingGames, to another entity called GameParticipant.
I (apparently) can retrieve the number of matches in the GameParticipant entity using this simple code in the Person object I created from the entity in the model:
[self.participatingGames count];
However, I'd ...
Hi all,
I have a data model with a many-to-many relationship like EntityA <-->> EntityB <<--> EntityC. I used to query EntityA with different search criteria and I use NSCompoundPredicate with an array of NSPredicates. On one of the predicate I wanted to query EntityA using EntityC. I tried to use the following SUBQUERY but it did not w...
By best I mean most efficient.
So don't go on about subjectiveness.
I have a list of websites and I want to store the list on the iphone locally, there must be an URL, title and a small image (like 32x32 max image size). I don't think I should be using CoreData for this. Should I be using a plist?
EDIT:
Efficient's definiton i though w...
Hi guys,
I have an object NetworkMember that has no attributes but is defined by its relationships Person, Network, Level and Role. In my app, I've found all the four relationships, but I want to make sure not to double-register my NetworkMember, thus I'd like to search for this NSManagedObject before instantiating it.
How should I wri...
I have a Core Data model with Items and Tags. Items may have multiple Tags, and Tags may be related to multiple Items. If I have an Item object, it has a tags attribute. Each Tag has a type, indicating that is a user tag, or a system generated tag. What I would like to do is create a fetched property on Item that would return only th...
In my project I'm using a tabBarController, then on one of my tabs, I add a navigation controller.
The problem I'm having is this: If I use this code in the AppDelegate:
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application...