Informs the delegate that
object is about to be encoded.
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The archiver that sent the message.
The object that is about to be encoded. This value is never
object or a different object to be encoded in its stead. The delegate can also modify the coder state. If the delegate returns
nil is encoded.
This method is called after the original object may have replaced itself with
This method is called whether or not the object is being encoded conditionally.
This method is not called for an object once a replacement mapping has been set up for that object (either explicitly, or because the object has previously been encoded). This method is also not called when
nil is about to be encoded.