Conforms to NSObject
Declared in PNDelegate.h

Tasks

Instance Methods

pubnubClient:accessRightsAuditDidFailWithError:

Called on delegate when \b PubNub client did fail to audit access rights.

- (void)pubnubClient:(PubNub *)client accessRightsAuditDidFailWithError:(PNError *)error

Discussion

Called on delegate when \b PubNub client did fail to audit access rights.

@param client \b PubNub client which failed request processing (this is singleton).

@param error \b PNError instance which holds information about when wrong and why request failed. \a ‘error.associatedObject’ contains reference on \b PNAccessRightOptions instance which will allow to review and identify what options \b PubNub client tried to apply.

Note: Always check \a error.code to find out what caused error (check PNErrorCodes header file and use \a -localizedDescription / \a -localizedFailureReason and \a -localizedRecoverySuggestion to get human readable description for error).

Declared In

PNDelegate.h

pubnubClient:accessRightsChangeDidFailWithError:

Called on delegate when \b PubNub client did fail to change access rights.

- (void)pubnubClient:(PubNub *)client accessRightsChangeDidFailWithError:(PNError *)error

Discussion

Called on delegate when \b PubNub client did fail to change access rights.

@param client \b PubNub client which failed request processing (this is singleton).

@param error \b PNError instance which holds information about when wrong and why request failed. \a ‘error.associatedObject’ contains reference on \b PNAccessRightOptions instance which will allow to review and identify what options \b PubNub client tried to apply.

Note: Always check \a error.code to find out what caused error (check PNErrorCodes header file and use \a -localizedDescription / \a -localizedFailureReason and \a -localizedRecoverySuggestion to get human readable description for error).

Declared In

PNDelegate.h

pubnubClient:clientStateRetrieveDidFailWithError:

Called on delegate when \b PubNub client did fail to retrieve state for client.

- (void)pubnubClient:(PubNub *)client clientStateRetrieveDidFailWithError:(PNError *)error

Discussion

Called on delegate when \b PubNub client did fail to retrieve state for client.

@param client \b PubNub instance which triggered event.

@param error \b PNError instance which describe what exactly went wrong.

Declared In

PNDelegate.h

pubnubClient:clientStateUpdateDidFailWithError:

Called on delegate when \b PubNub client did fail to update state for client.

- (void)pubnubClient:(PubNub *)client clientStateUpdateDidFailWithError:(PNError *)error

Discussion

Called on delegate when \b PubNub client did fail to update state for client.

@param client \b PubNub instance which triggered event.

@param error \b PNError instance which describe what exactly went wrong.

Declared In

PNDelegate.h

pubnubClient:connectionDidFailWithError:

Called on delegate when occurred error while tried to connect to PubNub services error - returned error will contain information about origin host name and error code which caused this error

- (void)pubnubClient:(PubNub *)client connectionDidFailWithError:(PNError *)error

Discussion

Called on delegate when occurred error while tried to connect to PubNub services error - returned error will contain information about origin host name and error code which caused this error

Declared In

PNDelegate.h

pubnubClient:didAuditAccessRights:

Called on delegate when \b PubNub client did complete access rights audit operation.

- (void)pubnubClient:(PubNub *)client didAuditAccessRights:(PNAccessRightsCollection *)accessRightsCollection

Discussion

Called on delegate when \b PubNub client did complete access rights audit operation.

@param client \b PubNub client which completed request processing (this is singleton).

@param accessRightsCollection Instance of \b PNAccessRightsCollection which stores set of access rights on different levels.

Declared In

PNDelegate.h

pubnubClient:didChangeAccessRights:

Called on delegate when \b PubNub client did complete access rights change operation.

- (void)pubnubClient:(PubNub *)client didChangeAccessRights:(PNAccessRightsCollection *)accessRightsCollection

Discussion

Called on delegate when \b PubNub client did complete access rights change operation.

@param client \b PubNub client which completed request processing (this is singleton).

@param accessRightsCollection Instance of \b PNAccessRightsCollection which stores set of access rights on different levels.

Declared In

PNDelegate.h

pubnubClient:didConnectToOrigin:

Called on delegate when client successfully connected to the origin and performed initial calls (time token requests to make connection keep-alive)

- (void)pubnubClient:(PubNub *)client didConnectToOrigin:(NSString *)origin

Discussion

Called on delegate when client successfully connected to the origin and performed initial calls (time token requests to make connection keep-alive)

Declared In

PNDelegate.h

pubnubClient:didDisablePresenceObservationOnChannels:

Called on delegate when client successfully disabled presence observation on set of channels

- (void)pubnubClient:(PubNub *)client didDisablePresenceObservationOnChannels:(NSArray *)channels

Discussion

Called on delegate when client successfully disabled presence observation on set of channels

Declared In

PNDelegate.h

pubnubClient:didDisablePushNotificationsOnChannels:

Called on delegate when client successfully disabled push notifications on specified list of channels

- (void)pubnubClient:(PubNub *)client didDisablePushNotificationsOnChannels:(NSArray *)channels

Discussion

Called on delegate when client successfully disabled push notifications on specified list of channels

Declared In

PNDelegate.h

pubnubClient:didDisconnectFromOrigin:

Called on delegate when client disconnected from PubNub services and ready for new session

- (void)pubnubClient:(PubNub *)client didDisconnectFromOrigin:(NSString *)origin

Discussion

Called on delegate when client disconnected from PubNub services and ready for new session

Declared In

PNDelegate.h

pubnubClient:didDisconnectFromOrigin:withError:

Called on delegate when client disconnected from PubNub services because of error

- (void)pubnubClient:(PubNub *)client didDisconnectFromOrigin:(NSString *)origin withError:(PNError *)error

Discussion

Called on delegate when client disconnected from PubNub services because of error

Declared In

PNDelegate.h

pubnubClient:didEnablePresenceObservationOnChannels:

Called on delegate when client successfully enabled presence observation on set of channels

- (void)pubnubClient:(PubNub *)client didEnablePresenceObservationOnChannels:(NSArray *)channels

Discussion

Called on delegate when client successfully enabled presence observation on set of channels

Declared In

PNDelegate.h

pubnubClient:didEnablePushNotificationsOnChannels:

Called on delegate when client successfully enabled push notifications on specified list of channels

- (void)pubnubClient:(PubNub *)client didEnablePushNotificationsOnChannels:(NSArray *)channels

Discussion

Called on delegate when client successfully enabled push notifications on specified list of channels

Declared In

PNDelegate.h

pubnubClient:didFailHistoryDownloadForChannel:withError:

Called on delegate when client failed to download messages history

- (void)pubnubClient:(PubNub *)client didFailHistoryDownloadForChannel:(PNChannel *)channel withError:(PNError *)error

Discussion

Called on delegate when client failed to download messages history

Declared In

PNDelegate.h

pubnubClient:didFailMessageSend:withError:

Called on delegate when some kind of error occurred while tried to send message to PubNub services

- (void)pubnubClient:(PubNub *)client didFailMessageSend:(PNMessage *)message withError:(PNError *)error

Discussion

Called on delegate when some kind of error occurred while tried to send message to PubNub services

Declared In

PNDelegate.h

pubnubClient:didFailParticipantChannelsListDownloadForIdentifier:withError:

  • Called on delegate when client failed to download participant channels list.
- (void)pubnubClient:(PubNub *)client didFailParticipantChannelsListDownloadForIdentifier:(NSString *)clientIdentifier withError:(PNError *)error

Discussion

  • Called on delegate when client failed to download participant channels list.

@param client \b PubNub instance which triggered this event.

@param participantChannelsList List of \b PNChannel instance for which \c clientIdentifier subscribed at this moment.

@param error \b PNError instance which describe what exactly went wrong.

Declared In

PNDelegate.h

pubnubClient:didFailParticipantsListDownloadForChannel:withError:

Called on delegate when client failed to download participants list

- (void)pubnubClient:(PubNub *)client didFailParticipantsListDownloadForChannel:(PNChannel *)channel withError:(PNError *)error

Discussion

Called on delegate when client failed to download participants list

Declared In

PNDelegate.h

pubnubClient:didReceiveClientState:

Called on delegate when \b PubNub client successfully retrieved state for client.

- (void)pubnubClient:(PubNub *)client didReceiveClientState:(PNClient *)remoteClient

Discussion

Called on delegate when \b PubNub client successfully retrieved state for client.

@param client \b PubNub instance which triggered event.

@param remoteClient \b PNClient instance which hold information about client identifier, channel at which state should be retrieved.

Declared In

PNDelegate.h

pubnubClient:didReceiveMessage:

Called on delegate when client received message from remote PubNub service

- (void)pubnubClient:(PubNub *)client didReceiveMessage:(PNMessage *)message

Discussion

Called on delegate when client received message from remote PubNub service

Declared In

PNDelegate.h

pubnubClient:didReceiveMessageHistory:forChannel:startingFrom:to:

Called on delegate when client completed message history download for specific channel

- (void)pubnubClient:(PubNub *)client didReceiveMessageHistory:(NSArray *)messages forChannel:(PNChannel *)channel startingFrom:(PNDate *)startDate to:(PNDate *)endDate

Discussion

Called on delegate when client completed message history download for specific channel

Declared In

PNDelegate.h

pubnubClient:didReceiveParticipantChannelsList:forIdentifier:

Called on delegate when client retrieved participant channels list for specific client identifier.

- (void)pubnubClient:(PubNub *)client didReceiveParticipantChannelsList:(NSArray *)participantChannelsList forIdentifier:(NSString *)clientIdentifier

Discussion

Called on delegate when client retrieved participant channels list for specific client identifier.

@param client \b PubNub instance which triggered this event.

@param participantChannelsList List of \b PNChannel instance for which \c clientIdentifier subscribed at this moment.

@param clientIdentifier Client identifier against which search has been performed.

Declared In

PNDelegate.h

pubnubClient:didReceiveParticipantsList:forChannel:

Called on delegate when client retrieved participants list for specific channel

- (void)pubnubClient:(PubNub *)client didReceiveParticipantsList:(NSArray *)participantsList forChannel:(PNChannel *)channel

Discussion

Called on delegate when client retrieved participants list for specific channel

Declared In

PNDelegate.h

pubnubClient:didReceivePresenceEvent:

Called on delegate when client received presence event from remote PubNub service

- (void)pubnubClient:(PubNub *)client didReceivePresenceEvent:(PNPresenceEvent *)event

Discussion

Called on delegate when client received presence event from remote PubNub service

Declared In

PNDelegate.h

pubnubClient:didReceivePushNotificationEnabledChannels:

Called on delegate when PubNub client was able to retrieve all channels on which push notifications has been enabled

- (void)pubnubClient:(PubNub *)client didReceivePushNotificationEnabledChannels:(NSArray *)channels

Discussion

Called on delegate when PubNub client was able to retrieve all channels on which push notifications has been enabled

Declared In

PNDelegate.h

pubnubClient:didReceiveTimeToken:

Called on delegate when PubNub client retrieved time token from PubNub service

- (void)pubnubClient:(PubNub *)client didReceiveTimeToken:(NSNumber *)timeToken

Discussion

Called on delegate when PubNub client retrieved time token from PubNub service

Declared In

PNDelegate.h

pubnubClient:didRestoreSubscriptionOnChannels:

Called on delegate when client successfully restored subscription on previous set of channels

- (void)pubnubClient:(PubNub *)client didRestoreSubscriptionOnChannels:(NSArray *)channels

Discussion

Called on delegate when client successfully restored subscription on previous set of channels

Declared In

PNDelegate.h

pubnubClient:didSendMessage:

Called on delegate when message was successfully set to the PubNub service

- (void)pubnubClient:(PubNub *)client didSendMessage:(PNMessage *)message

Discussion

Called on delegate when message was successfully set to the PubNub service

Declared In

PNDelegate.h

pubnubClient:didSubscribeOnChannels:

Called on delegate when client successfully subscribed to specified set of channels

- (void)pubnubClient:(PubNub *)client didSubscribeOnChannels:(NSArray *)channels

Discussion

Called on delegate when client successfully subscribed to specified set of channels

Declared In

PNDelegate.h

pubnubClient:didUnsubscribeOnChannels:

Called on delegate when client successfully unsubscribed from specified set of channels

- (void)pubnubClient:(PubNub *)client didUnsubscribeOnChannels:(NSArray *)channels

Discussion

Called on delegate when client successfully unsubscribed from specified set of channels

Declared In

PNDelegate.h

pubnubClient:didUpdateClientState:

Called on delegate when \b PubNub client successfully updated state for client.

- (void)pubnubClient:(PubNub *)client didUpdateClientState:(PNClient *)remoteClient

Discussion

Called on delegate when \b PubNub client successfully updated state for client.

@param client \b PubNub instance which triggered event.

@param remoteClient \b PNClient instance which hold information about client identifier, channel to which updated state should be pushed.

Declared In

PNDelegate.h

pubnubClient:error:

Called on delegate when some client runtime error occurred (mostly because of configuration/connection when connected)

- (void)pubnubClient:(PubNub *)client error:(PNError *)error

Discussion

Called on delegate when some client runtime error occurred (mostly because of configuration/connection when connected)

Declared In

PNDelegate.h

pubnubClient:presenceObservationDisablingDidFailWithError:

Called on delegate when some kind of error occurred during presence observation disabling error - returned error will contain information about channel on which this error occurred and possible reason of error

- (void)pubnubClient:(PubNub *)client presenceObservationDisablingDidFailWithError:(PNError *)error

Discussion

Called on delegate when some kind of error occurred during presence observation disabling error - returned error will contain information about channel on which this error occurred and possible reason of error

Declared In

PNDelegate.h

pubnubClient:presenceObservationEnablingDidFailWithError:

Called on delegate when some kind of error occurred during presence observation enabling error - returned error will contain information about channel on which this error occurred and possible reason of error

- (void)pubnubClient:(PubNub *)client presenceObservationEnablingDidFailWithError:(PNError *)error

Discussion

Called on delegate when some kind of error occurred during presence observation enabling error - returned error will contain information about channel on which this error occurred and possible reason of error

Declared In

PNDelegate.h

pubnubClient:pushNotificationDisableDidFailWithError:

Called on delegate when some kind of error occurred during push notification disabling process error - returned error will contain information about channel(s) on which this error occurred and possible reason of error

- (void)pubnubClient:(PubNub *)client pushNotificationDisableDidFailWithError:(PNError *)error

Discussion

Called on delegate when some kind of error occurred during push notification disabling process error - returned error will contain information about channel(s) on which this error occurred and possible reason of error

Declared In

PNDelegate.h

pubnubClient:pushNotificationEnableDidFailWithError:

Called on delegate when some kind of error occurred during push notification enabling process error - returned error will contain information about channel(s) on which this error occurred and possible reason of error

- (void)pubnubClient:(PubNub *)client pushNotificationEnableDidFailWithError:(PNError *)error

Discussion

Called on delegate when some kind of error occurred during push notification enabling process error - returned error will contain information about channel(s) on which this error occurred and possible reason of error

Declared In

PNDelegate.h

pubnubClient:pushNotificationEnabledChannelsReceiveDidFailWithError:

Called on delegate when some kind of error occurred during push notifications enabled channels list retrieval process

- (void)pubnubClient:(PubNub *)client pushNotificationEnabledChannelsReceiveDidFailWithError:(PNError *)error

Discussion

Called on delegate when some kind of error occurred during push notifications enabled channels list retrieval process

Declared In

PNDelegate.h

pubnubClient:pushNotificationsRemoveFromChannelsDidFailWithError:

Called on delegate when some kind of error occurred during push notifications removal process

- (void)pubnubClient:(PubNub *)client pushNotificationsRemoveFromChannelsDidFailWithError:(PNError *)error

Discussion

Called on delegate when some kind of error occurred during push notifications removal process

Declared In

PNDelegate.h

pubnubClient:subscriptionDidFailWithError:

Called on delegate when some kind of error occurred during subscription creation error - returned error will contain information about channel on which this error occurred and possible reason of error

- (void)pubnubClient:(PubNub *)client subscriptionDidFailWithError:(PNError *)error

Discussion

Called on delegate when some kind of error occurred during subscription creation error - returned error will contain information about channel on which this error occurred and possible reason of error

Declared In

PNDelegate.h

pubnubClient:timeTokenReceiveDidFailWithError:

Called on delegate when PubNub client failed to retrieve time token from PubNub service because of some error

- (void)pubnubClient:(PubNub *)client timeTokenReceiveDidFailWithError:(PNError *)error

Discussion

Called on delegate when PubNub client failed to retrieve time token from PubNub service because of some error

Declared In

PNDelegate.h

pubnubClient:unsubscriptionDidFailWithError:

Called on delegate when some kind of error occurred during unsubscribe error - returned error will contain information about channel on which this error occurred and possible reason of error

- (void)pubnubClient:(PubNub *)client unsubscriptionDidFailWithError:(PNError *)error

Discussion

Called on delegate when some kind of error occurred during unsubscribe error - returned error will contain information about channel on which this error occurred and possible reason of error

Declared In

PNDelegate.h

pubnubClient:willConnectToOrigin:

Called on delegate when client is about to initiate connection to the origin

- (void)pubnubClient:(PubNub *)client willConnectToOrigin:(NSString *)origin

Discussion

Called on delegate when client is about to initiate connection to the origin

Declared In

PNDelegate.h

pubnubClient:willDisconnectWithError:

Called on delegate when come error occurred during PubNub client connection session and it will be closed

- (void)pubnubClient:(PubNub *)client willDisconnectWithError:(PNError *)error

Discussion

Called on delegate when come error occurred during PubNub client connection session and it will be closed

Declared In

PNDelegate.h

pubnubClient:willRestoreSubscriptionOnChannels:

Called on delegate when client is about to init resubscribe on previous set of channels

- (void)pubnubClient:(PubNub *)client willRestoreSubscriptionOnChannels:(NSArray *)channels

Discussion

Called on delegate when client is about to init resubscribe on previous set of channels

Declared In

PNDelegate.h

pubnubClient:willSendMessage:

Called on delegate when PubNub client is about to send message to remote server

- (void)pubnubClient:(PubNub *)client willSendMessage:(PNMessage *)message

Discussion

Called on delegate when PubNub client is about to send message to remote server

Declared In

PNDelegate.h

pubnubClientDidRemovePushNotifications:

Called on delegate when PubNub client was able to remove push notification from all channels

- (void)pubnubClientDidRemovePushNotifications:(PubNub *)client

Discussion

Called on delegate when PubNub client was able to remove push notification from all channels

Declared In

PNDelegate.h

shouldKeepTimeTokenOnChannelsListChange

This method allow to override value passed in configuration during client initialization. This method called when client is changing list of channels (subscribe, unsubscribe, presence changes).

- (NSNumber *)shouldKeepTimeTokenOnChannelsListChange

Discussion

This method allow to override value passed in configuration during client initialization. This method called when client is changing list of channels (subscribe, unsubscribe, presence changes).

Declared In

PNDelegate.h

shouldReconnectPubNubClient:

This method allow to override value passed in configuration during client initialization. This method called when service reachabilty reported that service are available and previous session is failed because of network error or even not launched. We can change client configuration, but it will trigger client hard reset (if connected).

- (NSNumber *)shouldReconnectPubNubClient:(PubNub *)client

Discussion

This method allow to override value passed in configuration during client initialization. This method called when service reachabilty reported that service are available and previous session is failed because of network error or even not launched. We can change client configuration, but it will trigger client hard reset (if connected).

Declared In

PNDelegate.h

shouldRestoreSubscriptionFromLastTimeToken

This method allow to override value passed in configuration during client initialization. This method is called by library right after connection has been restored and client was configured to restore subscription on channels.

- (NSNumber *)shouldRestoreSubscriptionFromLastTimeToken

Discussion

This method allow to override value passed in configuration during client initialization. This method is called by library right after connection has been restored and client was configured to restore subscription on channels.

Declared In

PNDelegate.h

shouldResubscribeOnConnectionRestore

This method allow to override value passed in configuration during client initialization. This method called when service reachabilty reported that service are available and previous session is failed because of network error or even not launched. It allow to specify whether client should restore subscription or previously subscribed channels or not.

- (NSNumber *)shouldResubscribeOnConnectionRestore

Discussion

This method allow to override value passed in configuration during client initialization. This method called when service reachabilty reported that service are available and previous session is failed because of network error or even not launched. It allow to specify whether client should restore subscription or previously subscribed channels or not.

Declared In

PNDelegate.h

shouldRunClientInBackground

This method is pulled by PubNub client when checking whether it should run in background mode when application is pushed into background context. If this method not implemented by delegate, than client will check whether there is background mode keys in application information Property List and whether they is supported for persistent background execution or not.

- (BOOL)shouldRunClientInBackground

Discussion

This method is pulled by PubNub client when checking whether it should run in background mode when application is pushed into background context. If this method not implemented by delegate, than client will check whether there is background mode keys in application information Property List and whether they is supported for persistent background execution or not.

Declared In

PNDelegate.h