BNBUtilityManager
Objective-C
@interface BNBUtilityManager : NSObject
+ (void)initialize:(nonnull NSArray<NSString *> *)resourcePaths
clientToken:(nonnull NSString *)clientToken;
+ (void)release;
/** Add resources search path */
+ (void)addResourcePath:(nonnull NSString *)resourcePath;
/** Remove resources search path */
+ (void)removeResourcePath:(nonnull NSString *)resourcePath;
/** Diagnostic crash. Use this to check you crash analytics systems. */
+ (void)diagnosticCrash;
/**
* Get information about CPU capabilities. Mainly for usage on Android
* @return JSON-string describing CPU capabilties
*/
+ (nonnull NSString *)cpuEnv;
/**
* Check device SoC class.
* On Android first call may require presence of OpenGL context to
* get info about GPU.
* @return hardware class of device
*/
+ (BNBHardwareClass)getHardwareClass;
+ (void)setLogLevel:(BNBSeverityLevel)level;
/**
* Turns on SDK feature - analytics collection
* @param outputFolder here log files would be written
* could be documents directory for mobile apps
*/
+ (void)enableDiagnostics:(nonnull NSString *)outputFolder;
/** Turns on SDK feature - telemetry collection */
+ (void)enableTelemetry;
/**
* Set callback to recieve log events from Banuba SDK.
* @param cb Callback
* @param lvl recieve logs with specified and higher levels
*/
+ (void)setLogRecordCallback:(nullable id<BNBLogRecordCallback>)cb
lvl:(BNBSeverityLevel)lvl;
/** Returns SDK version as string */
+ (nonnull NSString *)getBanubaSdkVersionString;
/**
* Returns SDK version as number
* major = version / 10000000
* minor = (version - major * 10000000) / 100000
* patch = (version - major * 10000000 - minor * 100000) / 1000
* revision = version % 1000
*/
+ (int32_t)getBanubaSdkVersion;
/**
* The Banuba SDK tracks the resource version it built for.
* Returns version of resources as string, represented in the following format
* “Major.Minor.Patch”.
*/
+ (nonnull NSString *)getBanubaSdkResourcesVersionString;
/**
* Returns version as number
* major = version / 10000000
* minor = (version - major * 10000000) / 100000
* patch = (version - major * 10000000 - minor * 100000) / 1000
* revision = version % 1000
*/
+ (int32_t)getBanubaSdkResourcesVersion;
/**
* The Banuba SDK supports external resources archives.
* After the initialization of the Banuba SDK,
* API provides the capability to request the version of the archive.
* Returns version of resources archive as string,
* represented in the following format “Major.Minor.Patch”.
* Such a version coincides with the Banuba SDK resources version
* if no external resources are used.
*/
+ (nonnull NSString *)getBanubaSdkResourcesVersionArchiveString;
/**
* Checks if the current version of resources
* is equal to Banuba SDK expected resources version
*/
+ (BOOL)checkBanubaSdkResourcesVersion;
/** Checks if Banuba SDK treats as valid the version of external resources */
+ (BOOL)checkBanubaSdkResourcesVersionIgnorePatch;
/**
* load GL functions, for dynamic libraries only
* should be called with active GL context
*/
+ (void)loadGlFunctions;
@end
Swift
class BNBUtilityManager : NSObject
Undocumented
-
Undocumented
Declaration
Objective-C
+ (void)initialize:(nonnull NSArray<NSString *> *)resourcePaths clientToken:(nonnull NSString *)clientToken;
Swift
class func initialize(_ resourcePaths: [String], clientToken: String)
-
Undocumented
Declaration
Objective-C
+ (void)release;
Swift
class func release()
-
Add resources search path
Declaration
Objective-C
+ (void)addResourcePath:(nonnull NSString *)resourcePath;
Swift
class func addResourcePath(_ resourcePath: String)
-
Remove resources search path
Declaration
Objective-C
+ (void)removeResourcePath:(nonnull NSString *)resourcePath;
Swift
class func removeResourcePath(_ resourcePath: String)
-
Diagnostic crash. Use this to check you crash analytics systems.
Declaration
Objective-C
+ (void)diagnosticCrash;
Swift
class func diagnosticCrash()
-
Get information about CPU capabilities. Mainly for usage on Android
Declaration
Objective-C
+ (nonnull NSString *)cpuEnv;
Swift
class func cpuEnv() -> String
Return Value
JSON-string describing CPU capabilties
-
Check device SoC class. On Android first call may require presence of OpenGL context to get info about GPU.
Declaration
Objective-C
+ (BNBHardwareClass)getHardwareClass;
Swift
class func getHardwareClass() -> BNBHardwareClass
Return Value
hardware class of device
-
Undocumented
Declaration
Objective-C
+ (void)setLogLevel:(BNBSeverityLevel)level;
Swift
class func setLogLevel(_ level: BNBSeverityLevel)
-
Turns on SDK feature - analytics collection
Declaration
Objective-C
+ (void)enableDiagnostics:(nonnull NSString *)outputFolder;
Swift
class func enableDiagnostics(_ outputFolder: String)
Parameters
outputFolder
here log files would be written could be documents directory for mobile apps
-
Turns on SDK feature - telemetry collection
Declaration
Objective-C
+ (void)enableTelemetry;
Swift
class func enableTelemetry()
-
Set callback to recieve log events from Banuba SDK.
Declaration
Objective-C
+ (void)setLogRecordCallback:(nullable id<BNBLogRecordCallback>)cb lvl:(BNBSeverityLevel)lvl;
Swift
class func setLogRecordCallback(_ cb: BNBLogRecordCallback?, lvl: BNBSeverityLevel)
Parameters
cb
Callback
lvl
recieve logs with specified and higher levels
-
Returns SDK version as string
Declaration
Objective-C
+ (nonnull NSString *)getBanubaSdkVersionString;
Swift
class func getBanubaSdkVersionString() -> String
-
Returns SDK version as number major = version / 10000000 minor = (version - major * 10000000) / 100000 patch = (version - major * 10000000 - minor * 100000) / 1000 revision = version % 1000
Declaration
Objective-C
+ (int32_t)getBanubaSdkVersion;
Swift
class func getBanubaSdkVersion() -> Int32
-
The Banuba SDK tracks the resource version it built for. Returns version of resources as string, represented in the following format “Major.Minor.Patch”.
Declaration
Objective-C
+ (nonnull NSString *)getBanubaSdkResourcesVersionString;
Swift
class func getBanubaSdkResourcesVersionString() -> String
-
Returns version as number major = version / 10000000 minor = (version - major * 10000000) / 100000 patch = (version - major * 10000000 - minor * 100000) / 1000 revision = version % 1000
Declaration
Objective-C
+ (int32_t)getBanubaSdkResourcesVersion;
Swift
class func getBanubaSdkResourcesVersion() -> Int32
-
The Banuba SDK supports external resources archives. After the initialization of the Banuba SDK, API provides the capability to request the version of the archive. Returns version of resources archive as string, represented in the following format “Major.Minor.Patch”. Such a version coincides with the Banuba SDK resources version if no external resources are used.
Declaration
Objective-C
+ (nonnull NSString *)getBanubaSdkResourcesVersionArchiveString;
Swift
class func getBanubaSdkResourcesVersionArchiveString() -> String
-
Checks if the current version of resources is equal to Banuba SDK expected resources version
Declaration
Objective-C
+ (BOOL)checkBanubaSdkResourcesVersion;
Swift
class func checkBanubaSdkResourcesVersion() -> Bool
-
Checks if Banuba SDK treats as valid the version of external resources
Declaration
Objective-C
+ (BOOL)checkBanubaSdkResourcesVersionIgnorePatch;
Swift
class func checkBanubaSdkResourcesVersionIgnorePatch() -> Bool
-
load GL functions, for dynamic libraries only should be called with active GL context
Declaration
Objective-C
+ (void)loadGlFunctions;
Swift
class func loadGlFunctions()