SKDataWrapper
@objc
public class SKDataWrapper : NSObject, NSSecureCoding
Undocumented
-
Undocumented
Declaration
Swift
public class var supportsSecureCoding: Bool { get }
-
Undocumented
Declaration
Swift
public let data: Data
-
Undocumented
Declaration
Swift
public init(data: Data) -
Undocumented
Declaration
Swift
public required init?(coder aDecoder: NSCoder) -
Creates a new data wrapper for an
Encodableobject.Throws
ASKXPCError, if encoding fails.Declaration
Swift
public convenience init<T>(xpcObject: T) throws where T : EncodableParameters
objectThe object to encode and store.
-
Creates a new data wrapper for an
Encodableobject.Throws
ASKError, if encoding fails.Declaration
Swift
public convenience init<T>(object: T) throws where T : EncodableParameters
objectThe object to encode and store.
-
A convenience initializer that tries to create a data wrapper from an object.
Throws
AnSKErrorif encoding fails.Declaration
Swift
public convenience init(_ object: SourceKitRepresentable) throwsParameters
objectThe object to encode.
-
A convenience initializer that tries to create a data wrapper from an object.
If succesfully encodes the object, it is passed in to the
replyclosure. If it fails, it passes theSKXPCErrorin to thereplyclosure, and rethrows the error.Throws
AnSKXPCErrorif encoding fails.Declaration
Swift
public convenience init(_ object: SourceKitRepresentable, reply: (SKDataWrapper?, SKXPCError?) -> Void) throwsParameters
objectThe object to encode.
replyThe XPC reply closure.
-
Undocumented
Declaration
Swift
public func encode(with aCoder: NSCoder)
-
Returns a value of the type you specify, decoded from this wrapper’s data.
Throws
ASKXPCError, if decoding fails.Declaration
Swift
public func xpcDecodeData<T>() throws -> T where T : DecodableReturn Value
A value of the requested type.
-
Returns a value of the type you specify, decoded from this wrapper’s data.
Throws
ASKError, if decoding fails.Declaration
Swift
public func decodeData<T>() throws -> T where T : DecodableReturn Value
A value of the requested type.
SKDataWrapper Class Reference