Mac Developer Library

Developer

Foundation Framework Reference NSXPCProxyCreating Protocol Reference

Options
Deployment Target:

On This Page
Language:

NSXPCProxyCreating

Describes the methods for creating new proxy objects.

NSXPCConnection implements this protocol. All objects returned from the methods in this protocol also implement the protocol. This allows creation of new proxies from other proxies.

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import Foundation

Objective-C

@import Foundation;

Availability


Available in OS X v10.8 and later.
  • Returns a proxy object with no error handling block. (required)

    Declaration

    Swift

    func remoteObjectProxy() -> AnyObject

    Objective-C

    - (id)remoteObjectProxy

    Discussion

    Messages sent to the proxy object are sent over the wire to the other side of the connection. All messages must be 'void' return type. Control may be returned to the caller before the message is sent. The resulting proxy object conforms to the NSXPCProxyCreating protocol.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in OS X v10.8 and later.

  • Returns a proxy object that invokes the error handling block if an error occurs on the connection. (required)

    Declaration

    Swift

    func remoteObjectProxyWithErrorHandler(_ handler: (NSError!) -> Void) -> AnyObject

    Objective-C

    - (id)remoteObjectProxyWithErrorHandler:(void (^)(NSError *error))handler

    Parameters

    handler

    The error handling block that the proxy object should call when an error occurs while waiting for a reply.

    Discussion

    If the message sent to the proxy has a reply handler, then either the error handler or the reply handler is called exactly once.

    The resulting proxy object conforms to the NSXPCProxyCreating protocol.

    Import Statement

    Objective-C

    @import Foundation;

    Swift

    import Foundation

    Availability

    Available in OS X v10.8 and later.