Hi! I'm very new to programming and is currently making my first real iphone app. I want to make a rss reader which gets the data from a specific predefined feed and then displays data which has been posted the same day as the reader updates in a tableview. All the tutorials I've found didnt work in debug mode in xcode 3.2.5 ios 4.2 so I have not been able to understand them using NSLog events. so to sum up: Get data from today. display in tableview.
Ok, Those tutorials do work, you just need to configure your base sdk. Go into the Tutorials Forum - Tutorials Discussion and I have made a really easy to follow tutorial on how to fix it.
Quote:
Originally Posted by teslakiiing
Hi! I'm very new to programming and is currently making my first real iphone app. I want to make a rss reader which gets the data from a specific predefined feed and then displays data which has been posted the same day as the reader updates in a tableview. All the tutorials I've found didnt work in debug mode in xcode 3.2.5 ios 4.2 so I have not been able to understand them using NSLog events. so to sum up: Get data from today. display in tableview.
Ok, Those tutorials do work, you just need to configure your base sdk. Go into the Tutorials Forum - Tutorials Discussion and I have made a really easy to follow tutorial on how to fix it.
I have done that and tried running them on 4.0.1 iphone 3gs, 4.2.1 ipad and simulator and on the simulator none of them work and on my ipad none work while being run from xcode with debug but do work if I launch them normally from springboard.
Also I have not been able to get them to only display "todays" posts since i dont know how to.
I have done that and tried running them on 4.0.1 iphone 3gs, 4.2.1 ipad and simulator and on the simulator none of them work and on my ipad none work while being run from xcode with debug but do work if I launch them normally from springboard.
Also I have not been able to get them to only display "todays" posts since i dont know how to.
Yes i tried your tutorial but i didnt work. I mustve done something wrong because your attached file worked for me in simulator but not on ipad or iphone. Debugger just says:
Code:
Running…
Error launching remote program: failed to get the task for process 467.
Error launching remote program: failed to get the task for process 467.
The program being debugged is not being run.
The program being debugged is not being run.
and the app crashes before it even loads.
I very much appreciate your help and I apologize for my newbieness()
Quit Xcode and reopen it. If that doesn't work, reboot your iPad/iPhone.
Quote:
Originally Posted by teslakiiing
Yes i tried your tutorial but i didnt work. I mustve done something wrong because your attached file worked for me in simulator but not on ipad or iphone. Debugger just says:
Code:
Running…
Error launching remote program: failed to get the task for process 467.
Error launching remote program: failed to get the task for process 467.
The program being debugged is not being run.
The program being debugged is not being run.
and the app crashes before it even loads.
I very much appreciate your help and I apologize for my newbieness()
I figure I debug it in simulator and customize it and then just install on iphone.
But i have encountered a new problem. I changed the feed from the tutorial to the one I want and to make it only display todays items i tried to compare the currentDate before it was added to the array to just one random which I know exists. I did like this:
Code:
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{
//NSLog(@"ended element: %@", elementName);
if ([elementName isEqualToString:@"item"]) {
// save values to an item, then store that item into the array...
[item setObject:currentTitle forKey:@"title"];
[item setObject:currentLink forKey:@"link"];
[item setObject:currentSummary forKey:@"summary"];
[item setObject:currentDate forKey:@"pubDate"];
NSMutableString *date = currentDate;
NSLog(@"date: %@" , date);
if ([date isEqualToString:@"Mon, 03 Jan 2011 12:00:00 GMT"]) {
[stories addObject:[item copy]];
NSLog(@"adding story: %@", currentTitle);
NSLog(@"date : %@", currentDate);
}
NSLog(@"It didnt work");
}
}
and the date string shows in console as the date I compare to but the if loop still is not true.
Try putting it in the - (void)parser... foundElement method.
Quote:
Originally Posted by teslakiiing
I figure I debug it in simulator and customize it and then just install on iphone.
But i have encountered a new problem. I changed the feed from the tutorial to the one I want and to make it only display todays items i tried to compare the currentDate before it was added to the array to just one random which I know exists. I did like this:
Code:
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName{
//NSLog(@"ended element: %@", elementName);
if ([elementName isEqualToString:@"item"]) {
// save values to an item, then store that item into the array...
[item setObject:currentTitle forKey:@"title"];
[item setObject:currentLink forKey:@"link"];
[item setObject:currentSummary forKey:@"summary"];
[item setObject:currentDate forKey:@"pubDate"];
NSMutableString *date = currentDate;
NSLog(@"date: %@" , date);
if ([date isEqualToString:@"Mon, 03 Jan 2011 12:00:00 GMT"]) {
[stories addObject:[item copy]];
NSLog(@"adding story: %@", currentTitle);
NSLog(@"date : %@", currentDate);
}
NSLog(@"It didnt work");
}
}
and the date string shows in console as the date I compare to but the if loop still is not true.