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
RBSDKconfiguration singleton, only use the singleton or unexpected things will happen.Declaration
Objective-C
+ (nonnull instancetype)sharedInstance;Swift
class func sharedInstance() -> SelfReturn Value
A
RBSDKconfiguration 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
secretKeySDK’s secret key
accessKeySDK’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
secretKeySDK’s secret key
accessKeySDK’s access key
accountIdSDK’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
secretKeySDK’s secret key
accessKeySDK’s access key
tokenKeySDK’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
completionHandlerThe 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() -> BoolReturn 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() -> BoolReturn 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
sessionIdentifieridentifier for the current session.
View on GitHub
RBSDK Class Reference