PresenceActivity

@objc
public class PresenceActivity : NSObject

This class represents presentity status details.

  • The state of the presentity.

    Declaration

    Swift

    @objc
    public internal(set) var state: CPPresenceActivities { get }
  • This member may contain an optional status text when the ‘Other’ state is used.

    Declaration

    Swift

    @objc
    public internal(set) var other: String? { get }
  • This member represents a presentity willingness to engage in conversation.

    Declaration

    Swift

    @objc
    public internal(set) var willing: Bool { get }
  • The text string value of the presentity status.

    Declaration

    Swift

    @objc
    public var string: String { get }
  • Create presence status details object specifying the state.

    Declaration

    Swift

    @objc
    public init(_ state: CPPresenceActivities)
  • This helper method is used create a PresenceActivity object with custom status text and willingness.

    Declaration

    Swift

    @objc
    public class func makeOther(activity: String, willing: Bool) -> PresenceActivity

    Parameters

    activity

    Custom activty text to use for presentity status.

    willing

    Indicates if the custom state represents a willingness to communicate or not.

  • This helper method is used create a PresenceActivity object with unspecified status text but specifying willingness to communicate.

    Declaration

    Swift

    @objc
    public class func makeUnknown(willing: Bool) -> PresenceActivity

    Parameters

    willing

    Indicates if the user is willing to communicate or not.