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
callbackA success or failure callback function.
-
Subscribes all devices associated with the current device’s
clientIdto push notifications for the channel.Declaration
Objective-C
- (void)subscribeClient;Swift
func subscribeClient() -
Subscribes all devices associated with the current device’s
clientIdto push notifications for the channel.Declaration
Objective-C
- (void)subscribeClient:(nullable ARTCallback)callback;Swift
func subscribeClient(_ callback: ARTCallback? = nil)Parameters
callbackA 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
callbackA success or failure callback function.
-
Unsubscribes all devices associated with the current device’s
clientIdfrom receiving push notifications for the channel.Declaration
Objective-C
- (void)unsubscribeClient;Swift
func unsubscribeClient() -
Unsubscribes all devices associated with the current device’s
clientIdfrom receiving push notifications for the channel.Declaration
Objective-C
- (void)unsubscribeClient:(nullable ARTCallback)callback;Swift
func unsubscribeClient(_ callback: ARTCallback? = nil)Parameters
callbackA success or failure callback function.
-
Retrieves all push subscriptions for the channel. Subscriptions can be filtered using a
paramsobject. Returns aARTPaginatedResultobject containing an array ofARTPushChannelSubscriptionobjects.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) throwsParameters
paramsAn object containing key-value pairs to filter subscriptions by. Can contain
clientId,deviceIdor a combination of both ifconcatFiltersis set totrue, and alimiton the number of subscriptions returned, up to 1,000.callbackA callback for retriving an
ARTPaginatedResultobject with an array ofARTPushChannelSubscriptionobjects.errorPtrA reference to the
NSErrorobject where an error information will be saved in case of failure.Return Value
In case of failure returns
falseand the error information can be retrived via theerrorparameter.