views:

18

answers:

1

I have an object (testSession) that complies to NSCoder and when I use:

[NSKeyedArchiver archiveRootObject:testSession toFile:filename];

It has:

@interface Session : NSObject <NSCoding> {

and has encodeWithCoder: and initWithCoder: functions. Neither are getting called. What would prevent this?

- (void)encodeWithCoder:(NSCoder *)encoder
- (id)initWithCoder:(NSCoder *)decoder

Do these need to be declared in the header?

A: 

WHOOPS! I forgot to retain my testSession object after creating it. I'm a tad rusty :P

Dane Man