BDKCallClient
Objective-C
@protocol BDKCallClient <NSObject>
Swift
protocol CallClient : NSObjectProtocol
It’s the main item required to connect to the Bandyer platform. Once initialized, the object will connect and keep the connection with Bandyer platform, communicating and exchanging events with the servers. After a connection is established, the server will authenticate the client. Once the authentication is successful, it will be possible to make and receive calls to and from other users.
-
A property holding the current state of the client.
Declaration
Objective-C
@property (nonatomic, readonly) BDKCallClientState state;Swift
var state: CallClientState { get } -
Returns a boolean flag indicating whether the client is stopped or not
Declaration
Objective-C
- (BOOL)isStopped;Swift
func isStopped() -> BoolReturn Value
a boolean flag indicating whether the client is stopped or not
-
Returns a boolean flag indicating whether the client is starting or not
Declaration
Objective-C
- (BOOL)isStarting;Swift
func isStarting() -> BoolReturn Value
a boolean flag indicating whether the client is starting or not
-
Returns a boolean flag indicating whether the client is running or not
Declaration
Objective-C
- (BOOL)isRunning;Swift
func isRunning() -> BoolReturn Value
a boolean flag indicating whether the client is running or not
-
Returns a boolean flag indicating whether the client is paused or not
Declaration
Objective-C
- (BOOL)isPaused;Swift
func isPaused() -> BoolReturn Value
a boolean flag indicating whether the client is paused or not
-
Returns a boolean flag indicating whether the client is resuming or not
Declaration
Objective-C
- (BOOL)isResuming;Swift
func isResuming() -> BoolReturn Value
a boolean flag indicating whether the client is resuming or not
-
Returns a boolean flag indicating whether the client is reconnecting or not
Declaration
Objective-C
- (BOOL)isReconnecting;Swift
func isReconnecting() -> BoolReturn Value
a boolean flag indicating whether the client is reconnecting or not
-
Adds an observer that will be notified synchronously on a private background queue. The observer object will be held weakly.
Declaration
Objective-C
- (void)addObserver:(nonnull id<BDKCallClientObserver>)observer;Parameters
observerThe observer to be added.
-
Adds an observer specifying on which dispatch queue it must be notified. If a nil queue is provided the observer will be notified synchronously on a private background queue. Otherwise the observer will be notified asynchronously on the queue provided. The observer will be held weakly.
Declaration
Objective-C
- (void)addObserver:(nonnull id<BDKCallClientObserver>)observer queue:(nullable dispatch_queue_t)queue;Parameters
observerThe observer to add.
queueThe dispatch queue onto which the observer will be notified. May be nil.
-
Removes a client observer.
Declaration
Objective-C
- (void)removeObserver:(nonnull id<BDKCallClientObserver>)observer;Parameters
observerThe observer to be removed.
-
Start the client, connecting it to Bandyer platform. You should call this method after opening a user session on the BandyerSDK singleton instance.
See
[BandyerSDK.instance openSessionWithUser:]Declaration
Objective-C
- (void)start;Swift
func start() -
Resumes the client, reconnecting it to Bandyer platform, after the client has been paused first. You should call this method after the client has been paused, for example you might resume the client when the app returns in foreground.
Declaration
Objective-C
- (void)resume;Swift
func resume() -
Pause the client, disconnecting it from Bandyer platform. You should call this method when you want to stop the client from detecting incoming calls and making outgoing calls, for example you might pause the client when the app goes in background.
Declaration
Objective-C
- (void)pause;Swift
func pause() -
Stop the client, disconnecting it from Bandyer platform. You should stop it when app is going to be terminated. Once the client has been stopped, you must start it once again calling
[BDKCallClient start:]method if you want to reuse it.Declaration
Objective-C
- (void)stop;Swift
func stop()
-
Declaration
Objective-C
- (void)verifiedUser:(BOOL)verified forCall:(nonnull id<BDKCall>)call completion:(void (^_Nullable)(NSError *_Nullable))completion;Parameters
verifiedA boolean flag indicating if the user is actually verified.
callThe call on which set verified the current logged user.
completionA completion block called when the user verification response has been received. The completion block parameter will contain an error if an error occurred or nil on success. May be nil
View on GitHub
BDKCallClient Protocol Reference