00:00
2364
More
See all Show me
This is a detailed how-to that describes and demonstrates how to use NSKeyedArchivers and NSKeyedUnarchivers to load and save data. The tutorial uses the iPhone SDK for the example, but the same methods will work for regular projects built in Xcode for the Mac OS.

Source files for the tutorial can be downloaded from austinbull.com/tutorials/tutorial2.zip

Credits

Likes

See all likes
  • Americo Savinon 3 years ago
    Nice tutorial.

    I think in order to avoid forgetting to include class files (person.h in this case), synthesize, etc. It would be better if you first start creating the UI in Interface Builder and then code.
  •  
  • Nick Myers 3 years ago
    I tried several different ways of presenting the tutorial, but I found that it seemed to flow better if I did all the coding first. Plus, in this particular situation most of the cool stuff happens in the code anyway.
  •  
  • Elektroduende 3 years ago
    excelent :)
    thanks
  •  
  • Chuck Smith 3 years ago
    Excellent tutorial! Thanks so much!!
  •  
  • Steve Jarman 3 years ago
    This is a great tutorial, but I'm struggling with something. In my application I have several views which need to access the data. So in the "Add" view, entries can be added, in the "Show" view, entries can be shown and deleted. If the array is declared in the AppDelegate, how can that data be accessed by all of the views within the application?
  •  
  • Steve Jarman 3 years ago
    Please disregard that comment - I'm a little slow! Excellent tutorial! :)
  •  
  • AndrĂ© Burri 3 years ago
    Hello Nick,
    Thank you very much for the tutorials. It's very helpful.
    The explanation are very well done.
    Do you have a sample code or a tutorial using Tab Bar mixed with Navigation Controllers?
    Thanks,
    André
  •  
  • Nick Myers 3 years ago
    I don't have any sample code, but what you're asking about is rather easy once you understand how tab bar controllers and nav controllers work. I haven't done any tutorials in a while, but I've been getting a lot of emails and questions lately so it may be time to get some more ready. With Thanksgiving coming up, it may be a week or two before the next tutorial shows up....just know that there are some more coming.
  •  
  • Trung Tran 3 years ago
    Hello Nick,

    nice Tutorial. Helped me alot to understand how to save userdata. I just tried the leaks instruments provided by xcode and realized that there is a memory leak in the code. The memory leak comes from the init method in the delegate class. I just don't understand why.

    Thanks,
    Trung

    Edit: Sorry, this just happens on the simulator, not on the device.
  •  
  • nadol 3 years ago
    Very useful & Save me a lot of time.
    Thanks ^_^
  •  
  • Nick Myers 3 years ago
    @Trung Tran: I have an app that's available in the app store right now that had memory leaks when I tested it with Instruments. However, the program was leaking a data type that I didn't specifically declare, so I went ahead and submitted it and it got approved. My advice would be to make sure that your program isn't leaking anything you're directly responsible for. I chalk anything else up to buggy software (on Apple's part, not yours).
  •  
  • Romain Thiberville 3 years ago
    Really nice, thank you :)
  •  
  • Shannon Boggs 1 year ago
    Good video. I am new to iPhone programming. I noticed the comments are at least 1 yr old- is the code in this video still current best practice or has Apple changed or deprecated any code in it?
  • Shannon Boggs 1 year ago
    YES it is still good. I must have a typo somewhere. I just downloaded the code and it works fine. Thanks Nick.
  •  
This conversation is missing your voice. Take five seconds to join Vimeo or log in.

Advertisement

About this video

FLV
00:39:24
  • 1280x784, 50.43MB
  • Uploaded Sat August 02, 2008
  • Please join or log in to download

Statistics

Date Plays Comments
Totals 8,820 21 14
Feb 15th 0 0 0
Feb 14th 6 0 0
Feb 13th 9 0 0
Feb 12th 0 0 0
Feb 11th 0 0 0
Feb 10th 4 0 0
Feb 9th 4 0 0

Related lessons from Vimeo Video School

Check out these lessons to learn more about how you can make videos like this one!