NSKeyedArchiver ... can it skip a particular @property ?

hi all, I am trying NSKeyedArchiver to archive an ObjC object.

is it possible to specify a particular @property of the class that is to archived so that the @property is not put into the archive? or just put it into the archive as nil or something innocuous like NSNull or something.

e.g. i have a uidelegate @property in my class, but i dont want that put into the archive

i guess i could nil this out manually before archiving, but i wonder if anyone knows a cool trick for this

Replies

Cocoa archiving doesn’t have compiler support. You are required to write the -initWithCoder: and -encodeWithCoder: methods yourself. If you don’t want something to go into the archive, don’t encode it in your -encodeWithCoder: method.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"