Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nickyu

macrumors newbie
Original poster
Jun 13, 2008
5
0
I am new to obj-c programming/iphone, so I am probably missing something.
I am making a simple xml feed reader, which has AppDelegate, ListViewController, DetailViewController (other parts are not important so left out for simplicity).
- AppDelegate gets the XML from a URL, Parse the content into an NSMutableArray. WriteToFile.
- ListViewController recover the array using dataWithContentOfFile, populate the list view
- When use click on a item, then it brings to detail view.
DetailViewController recover the array using dataWithContentOfFile, get the selected Data, display.

What I could not figure out is that: the data can not be recovered from ListViewController, or DetailViewController, or maybe it didn't get saved at the first place. Since it is running with iphone simulator, I don't know if there is anyway to check if the file being created at the first place.

Thanks in advance
 

HawaiiMacAddict

macrumors 6502a
Dec 28, 2006
904
0
On one of my Macs of course
Aloha nickyu,

I'm just starting out myself with Obj-C and Xcode. As such, I haven't attempted an iPhone app, but one thing I do with the apps I've written thus far is to use the Console and insert NSLog statements to indicate success (or lack thereof) of certain parts of my code. I don't know if that option is available to you, but if so, you could use the log to indicate whether or not the data has been saved.

HawaiiMacAddict
 

nickyu

macrumors newbie
Original poster
Jun 13, 2008
5
0
Re: HawaiiMacAddict

Thanks for the NSLog hint. I will check that out tonight :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.