Tools selection guide 1.x - Bandyer/Bandyer-iOS-SDK GitHub Wiki

Starting from 1.7.0 version the BandyerSDK allows you to selectively enable or disable some of the call tools it provides. At the moment only the whiteboard and the filesharing tools can be enabled or disabled.

Table of contents

Whiteboard tool

In order to opt-out the whiteboard tool, you must provide a BDKWhiteboardToolConfiguration configuration object to the BDKConfig object provided during the BandyerSDK initialisation. The BDKWhiteboardToolConfiguration provides two factory methods, you can use to disable or enable the whiteboard tool. The disabled factory method, disables the whiteboard tool altogether, whereas the enabledWithUploadEnabled: method enables the whiteboard tool and uses the flag provided as argument to enable or disable the file upload tool provided by the Whiteboard. The whiteboard tool is enabled by the default if you don't provide any configuration object.

The following code snippets will show you how you disable the whiteboard tool in your app:

import Bandyer

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        let config = BDKConfig()
        config.environment = .sandbox
        config.whiteboardConfiguration = WhiteboardToolConfiguration.disabled()
        BandyerSDK.instance().initialize(withApplicationId: "YOUR APP ID", config: config)

        return true
    }
}
#import "AppDelegate.h"

#import <Bandyer/Bandyer.h>

@interface AppDelegate ()
@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    BDKConfig *config = [BDKConfig new];
    config.environment = BDKEnvironment.sandbox;
    config.whiteboardConfiguration = [BDKWhiteboardToolConfiguration disabled];
    [BandyerSDK.instance initializeWithApplicationId:@"YOUR APP ID" config:config];

    return YES;
}

@end

The following code snippets will show you how you can enable the whiteboard tool but disable the whiteboard upload tool:

import Bandyer

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        let config = BDKConfig()
        config.environment = .sandbox
        config.whiteboardConfiguration = WhiteboardToolConfiguration.enabled(withUploadEnabled: false)
        BandyerSDK.instance().initialize(withApplicationId: "YOUR APP ID", config: config)

        return true
    }
}
#import "AppDelegate.h"

#import <Bandyer/Bandyer.h>

@interface AppDelegate ()
@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    BDKConfig *config = [BDKConfig new];
    config.environment = BDKEnvironment.sandbox;
    config.whiteboardConfiguration = [BDKWhiteboardToolConfiguration enabledWithUploadEnabled:NO];
    [BandyerSDK.instance initializeWithApplicationId:@"YOUR APP ID" config:config];

    return YES;
}

@end

Filesharing tool

In order to opt-out the filesharing tool, you must provide a BDKFileshareToolConfiguration configuration object to the BDKConfig object provided during the BandyerSDK initialisation. The BDKFileshareToolConfiguration provides two factory methods analogous to the BDKWhiteboardToolConfiguration object. The disabled factory method, disables the fileshare tool altogether. The fileshare tool is enabled by the default if you don't provide any configuration object.

The following snippets of code will show you how you can disable the fileshare tool in your app:

import Bandyer

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        let config = BDKConfig()
        config.environment = .sandbox
        config.fileshareConfiguration = FileshareToolConfiguration.disabled()
        BandyerSDK.instance().initialize(withApplicationId: "YOUR APP ID", config: config)

        return true
    }
}
#import "AppDelegate.h"

#import <Bandyer/Bandyer.h>

@interface AppDelegate ()
@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    BDKConfig *config = [BDKConfig new];
    config.environment = BDKEnvironment.sandbox;
    config.fileshareConfiguration = [BDKFileshareToolConfiguration disabled];
    [BandyerSDK.instance initializeWithApplicationId:@"YOUR APP ID" config:config];

    return YES;
}

@end