RBSDK
@interface RBSDK : NSObject
RBSDK
object provide a singleton to load easily player controllers, the first
step is to set the secret and access keys, then use the
-[RBSDK loadAsynchronouslyWithCompletionHandler:]
method to load everything.
-
Returns a
RBSDK
configuration singleton, only use the singleton or unexpected things will happen.Declaration
Objective-C
+ (nonnull instancetype)sharedInstance;
Swift
class func sharedInstance() -> Self
Return Value
A
RBSDK
configuration singleton -
Set the secret and access key, this is needed for creating a player controller
Declaration
Objective-C
- (void)setSecretKey:(nonnull NSString *)secretKey accessKey:(nonnull NSString *)accessKey;
Swift
func setSecretKey(_ secretKey: String, accessKey: String)
Parameters
secretKey
SDK’s secret key
accessKey
SDK’s access key
-
Set the secret, access key and account id, this is needed for creating a player controller
Declaration
Objective-C
- (void)setSecretKey:(nonnull NSString *)secretKey accessKey:(nonnull NSString *)accessKey accountId:(nonnull NSString *)accountId;
Swift
func setSecretKey(_ secretKey: String, accessKey: String, accountId: String)
Parameters
secretKey
SDK’s secret key
accessKey
SDK’s access key
accountId
SDK’s account id
-
Set the secret, access and token key, this is needed for creating a player controller
Declaration
Objective-C
- (void)setSecretKey:(nonnull NSString *)secretKey accessKey:(nonnull NSString *)accessKey tokenKey:(nonnull NSString *)tokenKey;
Swift
func setSecretKey(_ secretKey: String, accessKey: String, tokenKey: String)
Parameters
secretKey
SDK’s secret key
accessKey
SDK’s access key
tokenKey
SDK’s token key
-
Use this method if you want to initialize a player a soon as posible, completion handler will be called after the configuration ends, is important to check if the process ended successfully or not.
Declaration
Objective-C
- (void)loadAsynchronouslyWithCompletionHandler: (nullable RBLoadHandlerBlock)completionHandler;
Swift
func loadAsynchronously(completionHandler: RBLoadHandlerBlock? = nil)
Parameters
completionHandler
The completion handler will say if the configuration was successfull or not, and if is not, check the NSError information.
-
Check if the sdk is ready to load players
Declaration
Objective-C
- (BOOL)isReady;
Swift
func isReady() -> Bool
Return Value
YES when is safe to create a player and all is already loaded
-
Check if the sdk is still loading
Declaration
Objective-C
- (BOOL)isLoading;
Swift
func isLoading() -> Bool
Return Value
YES when the configurator is still loading stuff
-
Set a session identifier. This is needed to identify the current session and a user behaviour anonymously.
Declaration
Objective-C
- (void)setSessionIdentifier:(nonnull NSString *)sessionIdentifier;
Swift
func setSessionIdentifier(_ sessionIdentifier: String)
Parameters
sessionIdentifier
identifier for the current session.