Mac Developer Library

Developer

IMServicePlugIn Framework Reference IMServicePlugInInstantMessagingSupport Protocol Reference

Options
Deployment Target:

On This Page
Language:

IMServicePlugInInstantMessagingSupport

Implementing this protocol on your service plug-in's principal class indicates that your service supports one-to-one instant messaging If you implement this protocol, you must also include IMServiceCapabilityInstantMessagingSupport as a value for the IMServiceCapabilities key in the Info.plist file of your service plug-in.

IMServicePlugInInstantMessagingSupport and IMServiceApplicationInstantMessagingSupport are paired protocols. If your service plug-in's principal class implements the IMServicePlugInInstantMessagingSupport protocol, the client object passed to your plug-in during initialization will implement the IMServiceApplicationInstantMessagingSupport protocol.

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import IMServicePlugIn

Objective-C

@import IMServicePlugIn;

Availability


Available in OS X v10.7 and later.
  • Sends a message to a specific handle. (required)

    Declaration

    Swift

    func sendMessage(_ message: IMServicePlugInMessage!, toHandle handle: String!)

    Objective-C

    - (oneway void)sendMessage:(IMServicePlugInMessage *)message toHandle:(NSString *)handle

    Parameters

    message

    The message being sent.

    handle

    The recipient of the message.

    Discussion

    To indicate successful delivery of the message and have it show up in the instant messaging client, call the plugInDidSendMessage:toHandle:error: method with a nil error; to indicate failure, call the same method with an appropriate error.

    Import Statement

    Objective-C

    @import IMServicePlugIn;

    Swift

    import IMServicePlugIn

    Availability

    Available in OS X v10.7 and later.

  • Indicates that the user started typing a message to a specific handle from the input line. (required)

    Declaration

    Swift

    func userDidStartTypingToHandle(_ handle: String!)

    Objective-C

    - (oneway void)userDidStartTypingToHandle:(NSString *)handle

    Parameters

    handle

    The handle to which the user has started typing.

    Import Statement

    Objective-C

    @import IMServicePlugIn;

    Swift

    import IMServicePlugIn

    Availability

    Available in OS X v10.7 and later.

  • Indicates that the user cleared the input line after typing, instead of sending the message. (required)

    Declaration

    Swift

    func userDidStopTypingToHandle(_ handle: String!)

    Objective-C

    - (oneway void)userDidStopTypingToHandle:(NSString *)handle

    Parameters

    handle

    The handle to which the user started typing.

    Import Statement

    Objective-C

    @import IMServicePlugIn;

    Swift

    import IMServicePlugIn

    Availability

    Available in OS X v10.7 and later.