BandyerSDK

@interface BandyerSDK : NSObject

The Bandyer SDK facade.

  • The configuration used by the module, provided in initialization method.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic, nullable) BDKConfig *config;

    Swift

    @NSCopying var config: BDKConfig? { get }
  • The call client instance.

    Throws: an NSInternalInconsistencyException is thrown when this property is accessed before the sdk is initialized.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) id<BCXCallClient> _Nonnull callClient;
  • The chat client instance.

    Throws: an NSInternalInconsistencyException is thrown when this property is accessed before the sdk is initialized.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) id<BCHChatClient> _Nonnull chatClient;
  • Initialize the module with the appId provided as argument, using a default configuration.

    Throws an exception if this method is called more than once during the lifetime of the application. Throws an NSInvalidArgumentException exception if a blank appId argument is provided.

    Declaration

    Objective-C

    - (void)initializeWithApplicationId:(nonnull NSString *)appId;

    Swift

    func initialize(withApplicationId appId: String)

    Parameters

    appId

    The applicationId.

  • Initialize the module with the appId and the configuration object provided as arguments.

    Once initialized, the module cannot be reinitialized anymore. Beware config object will be copied, so do not expect to change config options after the module has initialized.

    Throws an exception if this method is called more than once during the lifetime of the application. Throws an NSInvalidArgumentException exception if a blank appId argument is provided. Throws an NSInvalidArgumentException exception if a nil config object is provided.

    Declaration

    Objective-C

    - (void)initializeWithApplicationId:(nonnull NSString *)appId
                                 config:(nonnull BDKConfig *)config;

    Swift

    func initialize(withApplicationId appId: String, config: BDKConfig)

    Parameters

    appId

    The applicationId.

    config

    The config object.

Singleton

  • Returns the global singleton instance.

    Declaration

    Objective-C

    + (nonnull instancetype)instance;

    Swift

    class func instance() -> Self

    Return Value

    the global singleton instance.