I have a class called XYZ inheriting from NSObject and an array which contains objects of XYZ. I need to write this array to a plist file on to documents directory. After trying
You need to implement two methods: -initWithCoder: and -encodeWithCoder:. Read the NSCoding docs; they’re pretty straight-forward methods. You basically want to encode/decode your instance variables with a key that corresponds to its name.