iOS Serialisation and Encoding
Object Serialization in iOS Development
NSCoding Implementation
NSCoding Implementationclass CustomPoint: NSObject, NSCoding {
var x: Double = 0.0
var name: String = ""
func encode(with aCoder: NSCoder) {
aCoder.encode(x, forKey: "x")
aCoder.encode(name, forKey: "name")
}
required convenience init?(coder aDecoder: NSCoder) {
guard let name = aDecoder.decodeObject(forKey: "name") as? String else { return nil }
self.init(x: aDecoder.decodeDouble(forKey: "x"), name: name)
}
}Enhancing Security with NSSecureCoding
NSSecureCodingData Archiving with NSKeyedArchiver
NSKeyedArchiverUsing Codable for Simplified Serialization
Codable for Simplified SerializationJSON and XML Encoding Alternatives
Security Considerations
References
Last updated

