NSCoding

E820430

NSCoding is an Objective-C protocol in Apple’s frameworks that defines methods for encoding and decoding objects so they can be serialized and later reconstructed.

All labels observed (2)

Label Occurrences
NSCoding canonical 13
NSObjectProtocol 1

How this entity was disambiguated

Statements (47)

Predicate Object
instanceOf Objective-C protocol
serialization protocol
availableOnPlatform iOS
iPadOS
macOS
tvOS
watchOS
backwardCompatibility supports older archive formats
belongsToFrameworkFamily Foundation framework
decodingAbstraction NSCoder
definedInLanguage Objective-C
designPattern coder pattern
documentationURL https://developer.apple.com/documentation/foundation/nscoding
encodingAbstraction NSCoder
forwardCompatibility can ignore unknown keys when decoding
frameworkVendor Apple Inc.
methodRequirement -encodeWithCoder:
-initWithCoder:
partOfEcosystem Cocoa
Cocoa Touch
primaryPurpose object deserialization
object serialization
recommendedUsage use NSSecureCoding when possible
relatedTo NSCoder
NSKeyedArchiver
NSKeyedUnarchiver
NSSecureCoding
requiresConformance NSObject subclasses (typical)
requiresImplementationDetail decode and initialize object state in -initWithCoder:
encode all properties needed to reconstruct the object
securityCharacteristic not secure against object substitution attacks
serializationFormat keyed archiving
unkeyed archiving (legacy)
supersededBy NSSecureCoding (for secure archives)
supportsOperation decoding objects
encoding objects
typicalUseCase document-based app data
interface state restoration
model object persistence
user preferences archiving
usedFor archiving objects
backward-compatible data storage
interprocess data transfer
persisting object graphs
saving application state
unarchiving objects
usedInLanguage Swift

How these facts were elicited

Referenced by (14)

Full triples — surface form annotated when it differs from this entity's canonical label.

NSDate conformsTo NSCoding
NSCoder relatedTo NSCoding
WKInterfaceObject conformsTo NSObjectProtocol
linked to: NSCoding
AVAudioRecorder conformsTo NSCoding
NSFileHandle conformsTo NSCoding
NSSecureCoding conformsTo NSCoding
subject linked to: NSSecureCoding (via subclasses)
NSSecureCoding extends NSCoding
subject linked to: NSSecureCoding (via subclasses)
NSSecureCoding relatedTo NSCoding
subject linked to: NSSecureCoding (via subclasses)
NSWindow conformsTo NSCoding
NSResponder conformsTo NSCoding
NSMenu conformsTo NSCoding
NSText conformsTo NSCoding
NSDocument conformsTo NSCoding
NSWindowController conformsTo NSCoding