BDKConfig
@interface BDKConfig : NSObject <NSCopying>
A class encapsulating the configuration options for the bandyer sdk.
-
The user info fetcher instance that is going to be used whenever the sdk needs to show any user information like hers/his first name, last name and so on.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, null_resettable) id<BDKUserInfoFetcher> userInfoFetcher;
-
The environment where the module will run (e.g production, sandbox, and so on…).
Defaults to production.
Declaration
Objective-C
@property (readwrite, copy, nonatomic) BDKEnvironment *_Nonnull environment;
Swift
@NSCopying var environment: BDKEnvironment { get set }
-
A flag indicating whether CallKit should be enabled or disabled. If the system supports CallKit (i.e iOS >= 10.0), this flag will be enabled in the default configuration.
Declaration
Objective-C
@property (getter=isCallKitEnabled, assign, readwrite, nonatomic) BOOL callKitEnabled;
Swift
var isCallKitEnabled: Bool { get set }
-
A set containing which
CXHandleType
your app supports.The default value is a set containing
CXHandleTypeGeneric
value only.Declaration
Objective-C
@property (readwrite, copy, nonatomic) NSSet<NSNumber *> *_Nonnull supportedHandleTypes;
Swift
var supportedHandleTypes: Set<NSNumber> { get set }
-
The localized name of your app that will be shown in the native System UI when a call is being performed.
The default value is the CFBundleDisplayName value found in your app Info.plist file or the CFBundleName value if the former is not available.
Declaration
Objective-C
@property (readwrite, copy, nonatomic) NSString *_Nonnull nativeUILocalizedName;
Swift
var nativeUILocalizedName: String { get set }
-
The name of the sound resource in the app bundle to be used as ringtone when a call is received.
The default value is nil, meaning the system default ringtone will be used.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSString *nativeUIRingToneSound;
Swift
var nativeUIRingToneSound: String? { get set }
-
The PNG data for the icon image that will displayed in the native System UI for the button which takes the user from the system UI to your app. The icon image must be a square with side length of 40 points. The alpha channel of the image is used to create a white image mask.
Beware, you should provide the image as a NSData object, not an UIImage object. Take a look at
UIImagePNGRepresentation
function documentation for more info about transforming an UIImage to a NSData object representation.The default value is nil, meaning that the native UI will use a placeholder. It is highly recommended to provide an image.
Declaration
Objective-C
@property (readwrite, copy, nonatomic, nullable) NSData *nativeUITemplateIconImageData;
Swift
var nativeUITemplateIconImageData: Data? { get set }
-
An object conforming to
BCXHandleProvider
protocol that will be used by the module when a CXHandle object must be created.The default value, is an dummy object that returns the user aliases provided as the value of a
CXHandle
object withCXHandleTypeGeneric
type. This means that the native System UI will show user aliases as caller or callee user names.Declaration
Objective-C
@property (readwrite, strong, nonatomic, null_resettable) id<BCXHandleProvider> handleProvider;
-
The keypath the sdk will search for the Bandyer notification payload in the push notification received from APNS.
You must provide a valid keyPath before initializing the sdk. Failing to do so will crash your app.
Declaration
Objective-C
@property (readwrite, copy, nonatomic) NSString *_Nonnull notificationPayloadKeyPath;
Swift
var notificationPayloadKeyPath: String { get set }
-
An object conforming to
PKPushRegistryDelegate
protocol that will be notified when the voip push token has been updated.You must provide a valid object before initializing the sdk.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) id<PKPushRegistryDelegate> _Nonnull pushRegistryDelegate;
Swift
var pushRegistryDelegate: PKPushRegistryDelegate { get set }
-
This property sets the logging level for the module. If you want to turn on logging facilities you can set this value to one of the logging levels specified in the bandyer’s foundation framework (e.g. BDFDDLogLevelError, BDFDDLogLevelWarning and so on…). If you want to turn off logging you can pass
BDFDDLogLevelOff
value. The default value for this flag isBDFDDLogLevelOff
.Declaration
Objective-C
@property (assign, readwrite, nonatomic, class) BDFDDLogLevel logLevel;
Swift
class var logLevel: BDFDDLogLevel { get set }
-
The log context for the module, any logging statement generated from the module is tagged with this value. You can use it to filter out every logging statement coming from this module for example. Its value is 5831270
Declaration
Objective-C
@property (readonly, nonatomic, class) NSInteger logContext;
Swift
class var logContext: Int { get }
-
The log tag for the module, any logging statement generated from the module is tagged with this value. It’s a human readable string printed with each messages. Its value is “BandyerSDK”
Declaration
Objective-C
@property (readonly, nonatomic, class) NSString *_Nonnull logTag;
Swift
class var logTag: String { get }
-
Sets the log object responsible for logging log messages to loggers. The default log object is the
[BDFDDLog sharedInstance]
logging in console. (i.e. the logger added to the log object is the[BDFDDASLLogger sharedInstance]
).Declaration
Objective-C
+ (void)setLog:(nullable BDFDDLog *)log;
Swift
class func setLog(_ log: BDFDDLog?)
Parameters
log
the log object.
-
Adds the
logger
to the current log object.Declaration
Objective-C
+ (void)addLogger:(nonnull id<BDFDDLogger>)logger;
Swift
class func add(_ logger: BDFDDLogger)
Parameters
logger
the logger to be added.
-
Removes the
logger
from the current log object.Declaration
Objective-C
+ (void)removeLogger:(nonnull id<BDFDDLogger>)logger;
Swift
class func remove(_ logger: BDFDDLogger)
Parameters
logger
the logger to be removed.
-
Initialize a default configuration instance with default values set, for “Production” environment.
Warning
The default environment is production.Declaration
Objective-C
- (nonnull instancetype)init;
Swift
init()
Return Value
A default configuration instance.
-
Initialize a default configuration instance with default values set, for “Production” environment.
Warning
The default environment is production.Declaration
Objective-C
+ (nonnull instancetype)new;
Swift
class func new() -> Self
Return Value
A default configuration instance.