EndpointRegistrationManager Protocol Reference

Declared in EndpointRegistrationManager.h

Overview

Module that manages endpoint-initiated attaching and detaching endpoints to/from user.

To assign endpoints to user current endpoint has to be already attached, otherwise attach/detach operations will fail.

Current endpoint can be attached to user in two ways:
1. By calling -attachUser.
2. Attached from another endpoint.

EndpointKeyHash for endpoint can be received with AttachEndpoint operation provided from Operations server.

If current endpoint is assumed to be attached or detached by another endpoint, specific AttachEndpointToUserDelegate and DetachEndpointFromUserDelegate may be specified to receive notification about such event.

Manager uses specific UserTransport to communicate with Operations server in scope of basic functionality and ProfileTransport when its access token is changed.

– attachEndpointWithAccessToken:delegate: required method

Updates with new endpoint attach request.

- (void)attachEndpointWithAccessToken:(EndpointAccessToken *)accessToken delegate:(id<OnAttachEndpointOperationDelegate>)delegate

Parameters

accessToken

Access token of the attaching endpoint

delegate

Delegate to notify about result of the endpoint attaching

Discussion

Updates with new endpoint attach request.

OnAttachEndpointOperationDelegate is populated with EndpointKeyHash of an attached endpoint.

Declared In

EndpointRegistrationManager.h

– detachEndpointWithKeyHash:delegate: required method

Updates with new endpoint detach request

- (void)detachEndpointWithKeyHash:(EndpointKeyHash *)keyHash delegate:(id<OnDetachEndpointOperationDelegate>)delegate

Parameters

endpointKeyHash

Key hash of the detaching endpoint

delegate

Delegate to notify about result of the enpoint detaching

Discussion

Updates with new endpoint detach request

Declared In

EndpointRegistrationManager.h

– attachUserWithId:userAccessToken:delegate: required method

Creates user attach request using default verifier. Default verifier is selected during SDK generation. If there was no default verifier selected this method will throw runtime exception.

- (void)attachUserWithId:(NSString *)userExternalId userAccessToken:(NSString *)token delegate:(id<UserAttachDelegate>)delegate

Discussion

Creates user attach request using default verifier. Default verifier is selected during SDK generation. If there was no default verifier selected this method will throw runtime exception.

Declared In

EndpointRegistrationManager.h

– attachUserWithVerifierToken:userExternalId:userAccessToken:delegate: required method

Creates user attach request using specified verifier.

- (void)attachUserWithVerifierToken:(NSString *)userVerifierToken userExternalId:(NSString *)externalId userAccessToken:(NSString *)token delegate:(id<UserAttachDelegate>)delegate

Discussion

Creates user attach request using specified verifier.

Declared In

EndpointRegistrationManager.h

– isAttachedToUser required method

Checks if current endpoint is attached to user.

- (BOOL)isAttachedToUser

Return Value

YES if current endpoint is attached to any user, NO otherwise.

Discussion

Checks if current endpoint is attached to user.

Declared In

EndpointRegistrationManager.h

– setAttachDelegate: required method

Sets delegate for notifications when current endpoint is attached to user

- (void)setAttachDelegate:(id<AttachEndpointToUserDelegate>)delegate

Discussion

Sets delegate for notifications when current endpoint is attached to user

Declared In

EndpointRegistrationManager.h

– setDetachDelegate: required method

Sets delegate for notifications when current endpoint is detached from user

- (void)setDetachDelegate:(id<DetachEndpointFromUserDelegate>)delegate

Discussion

Sets delegate for notifications when current endpoint is detached from user

Declared In

EndpointRegistrationManager.h