ARTPushChannelProtocol

Objective-C

@protocol ARTPushChannelProtocol

Swift

protocol ARTPushChannelProtocol

The protocol upon which the ARTPushChannel is implemented.

  • Subscribes the device to push notifications for the channel.

    Declaration

    Objective-C

    - (void)subscribeDevice;

    Swift

    func subscribeDevice()
  • Subscribes the device to push notifications for the channel.

    Declaration

    Objective-C

    - (void)subscribeDevice:(nullable ARTCallback)callback;

    Swift

    func subscribeDevice(_ callback: ARTCallback? = nil)

    Parameters

    callback

    A success or failure callback function.

  • Subscribes all devices associated with the current device’s clientId to push notifications for the channel.

    Declaration

    Objective-C

    - (void)subscribeClient;

    Swift

    func subscribeClient()
  • Subscribes all devices associated with the current device’s clientId to push notifications for the channel.

    Declaration

    Objective-C

    - (void)subscribeClient:(nullable ARTCallback)callback;

    Swift

    func subscribeClient(_ callback: ARTCallback? = nil)

    Parameters

    callback

    A success or failure callback function.

  • Unsubscribes the device from receiving push notifications for the channel.

    Declaration

    Objective-C

    - (void)unsubscribeDevice;

    Swift

    func unsubscribeDevice()
  • Unsubscribes the device from receiving push notifications for the channel.

    Declaration

    Objective-C

    - (void)unsubscribeDevice:(nullable ARTCallback)callback;

    Swift

    func unsubscribeDevice(_ callback: ARTCallback? = nil)

    Parameters

    callback

    A success or failure callback function.

  • Unsubscribes all devices associated with the current device’s clientId from receiving push notifications for the channel.

    Declaration

    Objective-C

    - (void)unsubscribeClient;

    Swift

    func unsubscribeClient()
  • Unsubscribes all devices associated with the current device’s clientId from receiving push notifications for the channel.

    Declaration

    Objective-C

    - (void)unsubscribeClient:(nullable ARTCallback)callback;

    Swift

    func unsubscribeClient(_ callback: ARTCallback? = nil)

    Parameters

    callback

    A success or failure callback function.

  • Retrieves all push subscriptions for the channel. Subscriptions can be filtered using a params object. Returns a ARTPaginatedResult object containing an array of ARTPushChannelSubscription objects.

    Declaration

    Objective-C

    - (BOOL)listSubscriptions:(nonnull NSStringDictionary *)params
                     callback:(nonnull ARTPaginatedPushChannelCallback)callback
                        error:(NSError *_Nullable *_Nullable)errorPtr;

    Swift

    func listSubscriptions(_ params: [String : String], callback: @escaping ARTPaginatedPushChannelCallback) throws

    Parameters

    params

    An object containing key-value pairs to filter subscriptions by. Can contain clientId, deviceId or a combination of both if concatFilters is set to true, and a limit on the number of subscriptions returned, up to 1,000.

    callback

    A callback for retriving an ARTPaginatedResult object with an array of ARTPushChannelSubscription objects.

    errorPtr

    A reference to the NSError object where an error information will be saved in case of failure.

    Return Value

    In case of failure returns false and the error information can be retrived via the error parameter.