iOS
Android
Unity
REST Api
BDArenaPushDelegate

Availability : ver 3.2 and later

Declared in : BDArenaPushDelegate.h

Sample code : -

Overview

The delegates of the BDArenaConnector object must adopt the BDArenaPushDelegate protocol in order to be notified about the push module's events. Optional methods of the protocol allow the delegates to manage the registrations of the device token, sending and receiving notifications, subscribing and unsubscribing to and from channels.

Tasks

Registering device token

- arenaPush:registerDeviceWithToken:didFailWithError:

- arenaPush:registerDeviceDidSucceedWithToken:

 

Managing subscriptions

- arenaPush:subscriptionToChannel:didFailWithError:

- arenaPush:subscriptionDidSucceedToChannel:alreadySubscribed:

- arenaPush:unsubscriptionFromChannel:didFailWithError:

- arenaPush:unsubscriptionDidSucceedFromChannel:didPlayerSubscribeToChannel:

- arenaPush:getSubscriptionsDidFailWithError:

- arenaPush:getSubscriptionsDidSucceedWithArray:

 

Sending push notifications

- arenaPush:sendPushWithIdentifier:toPlayerWithAuid:didFailWithError:

- arenaPush:sendPushWithIdentifier:successfullySentToPlayerWithAuid:

- arenaPush:sendPushWithIdentifier:toChannel:didFailWithError:

- arenaPush:sendPushWithIdentifier:successfullySentToChannel: 

 

 


 

 

 

arenaPush:registerDeviceWithToken:didFailWithError:

 

Informs that the device token registration did fail.

 

- (void) arenaPush:(BDArenaPush*)push

        registerDeviceWithToken:(NSData*)deviceToken

        didFailWithError:(NSError*)error;

 

Parameters

push

    The unique BDArenaPush instance.

deviceToken

    An NSData object that brings the device token.

error

    An NSError object that informs about the kind of error that happened.

    For more information about errors, check out the Errors Map section.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:registerDeviceDidSucceedWithToken:

 

Informs that the device token registration did succeed.

 

- (void) arenaPush:(BDArenaPush*)push

        registerDeviceDidSucceedWithToken:(NSData*)deviceToken;

 

Parameters

push

    The unique BDArenaPush instance.

deviceToken

    An NSData object that brings the device token.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:subscriptionToChannel:didFailWithError:

 

Informs that the local player subscription request did fail.

 

- (void) arenaPush:(BDArenaPush*)push

        subscriptionToChannel:(NSString*)channelName

        didFailWithError:(NSError*)error;

 

Parameters

push

    The unique BDArenaPush instance.

channelName

    The target channel name.

error

    An NSError object containing the specific error that occurred.

    For more information about errors, check out the Errors Map section.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:subscriptionDidSucceedToChannel:

    alreadySubscribed:alreadySubscribed

 

Informs that the local player subscription request did succeed.

 

- (void) arenaPush:(BDArenaPush*)push

        subscriptionDidSucceedToChannel:(NSString*)channelName

        alreadySubscribed:(BOOL)alreadySubscribed;

 

Parameters

push

    The unique BDArenaPush instance.

channelName

    The target channel name.

alreadySubscribed

    A boolean value that informs about the subscription status

    of the local player to the requested channel.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:unsubscriptionFromChannel:didFailWithError:

 

Informs that the local player unsubscription request did fail.

 

- (void) arenaPush:(BDArenaPush*)push

        unsubscriptionFromChannel:(NSString*)channelName

        didFailWithError:(NSError*)error;

 

Parameters

push

    The unique BDArenaPush instance.

channelName

    The target channel name.

error

    An NSError object containing the specific error that occurred.

    For more information about errors, check out the Errors Map section.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:unsubscriptionDidSucceedFromChannel:

    didPlayerSubscribeToChannel:

 

Informs that the local player unsubscription request did succeed.

 

- (void) arenaPush:(BDArenaPush*)push

        unsubscriptionDidSucceedFromChannel:(NSString*)channelName

        didPlayerSubscribeToChannel:(BOOL)didSubscribe;

 

Parameters

push

    The unique BDArenaPush instance.

channelName

    The target channel name.

didSubscribe

    A boolean value that informs about the subscription status

    of the local player to the requested channel.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:getSubscriptionsDidFailWithError:

 

Informs that the local player request for retrieving subscriptions list did fail.

 

- (void) arenaPush:(BDArenaPush*)push

        getSubscriptionsDidFailWithError:(NSError*)error;

 

Parameters

push

    The unique BDArenaPush instance.

error

    An NSError object containing the specific error that occurred.

    For more information about errors, check out the Errors Map section.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:getSubscriptionsDidSucceedWithArray:

 

Informs that the local player request for retrieving subscriptions list did succeed.

 

- (void) arenaPush:(BDArenaPush*)push

        getSubscriptionsDidSucceedWithArray:(NSArray*)channelsArray;

 

Parameters

push

    The unique BDArenaPush instance.

channelsArray

    An NSArray that bring the subscribed channel names.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:sendPushWithIdentifier:toPlayerWithAuid:didFailWithError:

 

Informs that the sending of a notification did fail.

 

- (void) arenaPush:(BDArenaPush*)push

        sendPushWithIdentifier:(NSString*)identifier

        toPlayerWithAuid:(NSInteger)auid

        didFailWithError:(NSError*)error;

 

Parameters

push

    The unique BDArenaPush instance.

identifier

    An NSString object containing an unique identifier for the notification sent.

    This identifier is automatically set by the SDK when the local player sends a new notification.

auid

    The Arena Daemon Unique Id (auid) of the target player.

error

    An NSError object containing the specific error that occurred.

    For more information about errors, check out the Errors Map section.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:sendPushWithIdentifier:successfullySentToPlayerWithAuid:

 

Informs that the sending of a notification did succeed.

 

- (void) arenaPush:(BDArenaPush*)push

        sendPushWithIdentifier:(NSString*)identifier

        successfullySentToPlayerWithAuid:(NSInteger)auid;

 

Parameters

push

    The unique BDArenaPush instance.

identifier

    An NSString object containing an unique identifier for the notification sent.

    This identifier is automatically set by the SDK when the local player sends a new notification.

auid

    The Arena Daemon Unique Id (auid) of the target player.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:sendPushWithIdentifier:toChannel:didFailWithError:

 

Informs that the sending of a notification did fail.

 

- (void) arenaPush:(BDArenaPush*)push

        sendPushWithIdentifier:(NSString*)identifier

        toChannel:(NSString*)channelName

        didFailWithError:(NSError*)error;

 

Parameters

push

    The unique BDArenaPush instance.

identifier

    An NSString object containing an unique identifier for the notification sent.

    This identifier is automatically set by the SDK when the local player sends a new notification.

channelName

    The target channel name.

error

    An NSError object containing the specific error that occurred.

    For more information about errors, check out the Errors Map section.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h

 

 

 

arenaPush:sendPushWithIdentifier:successfullySentToChannel:

 

Informs that the sending of a notification did succeed.

 

- (void) arenaPush:(BDArenaPush*)push

        sendPushWithIdentifier:(NSString*)identifier

        successfullySentToChannel:(NSString*)channelName;

 

Parameters

push

    The unique BDArenaPush instance.

identifier

    An NSString object containing an unique identifier for the notification sent.

    This identifier is automatically set by the SDK when the local player sends a new notification.

channelName

    The target channel name.

 

Availability

available in SDK ver 3.2 and later

 

Declared in

BDArenaPushDelegate.h