Meeting SDK for iOS API Reference
Loading...
Searching...
No Matches
MobileRTC Class Reference

Initialize the class to acquire all the services. More...

#include <MobileRTC.h>

Inherits NSObject.

Instance Methods

(BOOL) - initialize:
 Initializes MobileRTC.
 
(BOOL) - switchDomain:force:
 Switches the MobileRTC domain.
 
(void) - setMobileRTCCustomLocalizableName:
 Sets the name of Localizable file for MobileRTC.
 
(UINavigationController *_Nullable) - mobileRTCRootController
 Gets the root navigation controller of MobileRTC client.
 
(void) - setMobileRTCRootController:
 Sets the MobileRTC client root navigation controller.
 
(UIScene *_Nullable) - mobileRTCPresentationScene
 Get the presentation scene of MobileRTC client.
 
(void) - setMobileRTCPresentationScene:
 Sets the UIScene context used by the SDK. In multi-scene environments, an application may create multiple UIScene instances. This method allows you to provide the SDK with the specific scene it should use for presenting UI, handling lifecycle events, or associating with the application's environment.
 
(NSString *_Nullable) - mobileRTCVersion
 Gets the MobileRTC version.

 
(BOOL) - isRTCAuthorized
 Queries if the MobileRTC is authorized successfully or not.
 
(BOOL) - isSupportedCustomizeMeetingUI
 Queries if custom meeting UI is supported by MobileRTC.
 
(BOOL) - isEnabledCustomizeMeetingUI
 Queries if custom meeting UI is enabled by MobileRTC.
 
(MobileRTCAuthService *_Nullable) - getAuthService
 Gets the default authentication service.

 
(MobileRTCMeetingService *_Nullable) - getMeetingService
 Gets the default meeting service.

 
(MobileRTCMeetingSettings *_Nullable) - getMeetingSettings
 Gets the MobileRTC default meeting settings.
 
(MobileRTCAnnotationService *_Nullable) - getAnnotationService
 Gets the MobileRTC default annotation service.

 
(MobileRTCRemoteControlService *_Nullable) - getRemoteControlService
 Gets the default MobileRTC remote control service.

 
(MobileRTCCameraControlService *_Nullable) - getCameraControlService:
 Gets the default MobileRTC camera control service.
 
(MobileRTCSDKError- revokeCameraControlPrivilege
 Revoke camera control privilege.
 
(MobileRTCWaitingRoomService *_Nullable) - getWaitingRoomService
 Gets the default MobileRTC waiting room service.
 
(MobileRTCSMSService *_Nullable) - getSMSService
 Gets the default MobileRTC sms service.
 
(MobileRTCDirectShareService *_Nullable) - getDirectShareService
 Gets the default MobileRTC direct share service.
 
(MobileRTCReminderHelper *_Nullable) - getReminderHelper
 Gets the default MobileRTC reminder helper.
 
(MobileRTCVideoSourceHelper *_Nullable) - getVideoSourceHelper
 Gets the video source helper.
 
(MobileRTCShareSourceHelper *_Nullable) - getShareSourceHelper
 Gets the share source helper.
 
(NSArray< NSString * > *_Nonnull) - supportedLanguages
 Gets the languages supported by MobileRTC.

 
(void) - setLanguage:
 Sets the MobileRTC language.
 
(void) - appWillResignActive
 Notifies common layer that application will resign active. Call the systematical method and then call the appWillResignActive via applicationWillResignActive.
 
(void) - appDidBecomeActive
 Notifies common layer that application did become active. Call the appDidBecomeActive via applicationDidBecomeActive.
 
(void) - appDidEnterBackground
 Notifies common layer that application did enter background. Call the appDidEnterBackground via applicationDidEnterBackground.
 
(void) - appWillTerminate
 Notifies common layer that application will terminate. Call the appWillTerminate via applicationWillTerminate.
 
(void) - cleanup
 Cleanup the SDK.
 
(void) - willTransitionToTraitCollection:withTransitionCoordinator:
 Notifies MobileRTC when the root UIViewController's traitCollection will change.
 
(void) - viewWillTransitionToSize:withTransitionCoordinator:
 Notifies MobileRTC when the root UIViewController's view size will change.
 
(BOOL) - hasRawDataLicense
 Gets whether you have permission to use raw data.
 

Class Methods

(MobileRTC *_Nonnull) + sharedRTC
 Gets the MobileRTC client.
 

Properties

NSString *_Nullable mobileRTCDomain
 MobileRTC domain, read-only.
 
NSString *_Nullable mobileRTCResPath
 The path of MobileRTC Resources Bundle, read-only.
 
NSString *_Nullable mobileRTCCustomLocalizableName
 The name of APP Localizable file for MobileRTC, read-only.
 

Detailed Description

Initialize the class to acquire all the services.

Warning
Access to the class and all the other components of the MobileRTC by merging <MobileRTC/MobileRTC.h> into source code.
The user can only obtain SDK configuration by initializing the class.

Definition at line 116 of file MobileRTC.h.

Method Documentation

◆ appDidBecomeActive

- (void) appDidBecomeActive

Notifies common layer that application did become active. Call the appDidBecomeActive via applicationDidBecomeActive.

Warning
It is necessary to call the method in AppDelegate "- (void)applicationDidBecomeActive:(UIApplication *)application".

◆ appDidEnterBackground

- (void) appDidEnterBackground

Notifies common layer that application did enter background. Call the appDidEnterBackground via applicationDidEnterBackground.

Warning
It is necessary to call the method in AppDelegate "- (void)applicationDidEnterBackground:(UIApplication *)application".

◆ appWillResignActive

- (void) appWillResignActive

Notifies common layer that application will resign active. Call the systematical method and then call the appWillResignActive via applicationWillResignActive.

Warning
It is necessary to call the method in AppDelegate "- (void)applicationWillResignActive:(UIApplication *)application".

◆ appWillTerminate

- (void) appWillTerminate

Notifies common layer that application will terminate. Call the appWillTerminate via applicationWillTerminate.

Warning
It is necessary to call the method in AppDelegate "- (void)applicationWillTerminate:(UIApplication *)application".

◆ cleanup

- (void) cleanup

Cleanup the SDK.

Warning
User will clean up the SDK when no longer need the SDK instance, only can call this method after initialized.

◆ getAnnotationService

- (MobileRTCAnnotationService *_Nullable) getAnnotationService

Gets the MobileRTC default annotation service.

Returns
If the function succeeds, it returns a MobileRTCAnnotationService object. Otherwise, this function fails and returns nil.

◆ getAuthService

- (MobileRTCAuthService *_Nullable) getAuthService

Gets the default authentication service.

Warning
The MobileRTC can not be called unless the authentication service is called successfully.
Returns
If the function succeeds, it returns a MobileRTCAuthService object. Otherwise, this function fails and returns nil.

◆ getCameraControlService:

- (MobileRTCCameraControlService *_Nullable) getCameraControlService: (NSInteger) userId

Gets the default MobileRTC camera control service.

Returns
If the function succeeds, it returns a MobileRTCCameraControlService object. Otherwise, this function fails and returns nil.

◆ getDirectShareService

- (MobileRTCDirectShareService *_Nullable) getDirectShareService

Gets the default MobileRTC direct share service.

Returns
If the function succeeds, it returns a MobileRTCDirectShareService object. Otherwise, this function fails and returns nil.

◆ getMeetingService

- (MobileRTCMeetingService *_Nullable) getMeetingService

Gets the default meeting service.

Returns
If the function succeeds, it returns a MobileRTCMeetingService object. Otherwise, this function fails and returns nil.

◆ getMeetingSettings

- (MobileRTCMeetingSettings *_Nullable) getMeetingSettings

Gets the MobileRTC default meeting settings.

Returns
If the function succeeds, it returns a MobileRTCMeetingSettings object. Otherwise, this function fails and returns nil.

◆ getReminderHelper

- (MobileRTCReminderHelper *_Nullable) getReminderHelper

Gets the default MobileRTC reminder helper.

Returns
If the function succeeds, it returns a MobileRTCReminderHelper object. Otherwise, this function fails and returns nil.

◆ getRemoteControlService

- (MobileRTCRemoteControlService *_Nullable) getRemoteControlService

Gets the default MobileRTC remote control service.

Returns
If the function succeeds, it returns a MobileRTCRemoteControlService object. Otherwise, this function fails and returns nil.

◆ getShareSourceHelper

- (MobileRTCShareSourceHelper *_Nullable) getShareSourceHelper

Gets the share source helper.

See also
MobileRTCShareSourceHelper.
Returns
If the function succeeds, it returns a MobileRTCShareSourceHelper object. Otherwise, this function fails and returns nil.

◆ getSMSService

- (MobileRTCSMSService *_Nullable) getSMSService

Gets the default MobileRTC sms service.

Returns
If the function succeeds, it returns a MobileRTCSMSService object. Otherwise, this function fails and returns nil.

◆ getVideoSourceHelper

- (MobileRTCVideoSourceHelper *_Nullable) getVideoSourceHelper

Gets the video source helper.

See also
MobileRTCVideoSourceHelper.
Returns
If the function succeeds, it returns a MobileRTCVideoSourceHelper object. Otherwise, this function fails and returns nil.

◆ getWaitingRoomService

- (MobileRTCWaitingRoomService *_Nullable) getWaitingRoomService

Gets the default MobileRTC waiting room service.

Returns
If the function succeeds, it returns a MobileRTCWaitingRoomService object. Otherwise, this function fails and returns nil.

◆ hasRawDataLicense

- (BOOL) hasRawDataLicense

Gets whether you have permission to use raw data.

Returns
YES means you have permission to use raw data.
Warning
It is necessary to call the method after auth success.

◆ initialize:

- (BOOL) initialize: (MobileRTCSDKInitContext *_Nonnull) context

Initializes MobileRTC.

Warning
The instance will be instantiated only once over the lifespan of the application.
Parameters
contextInitialize the parameter configuration of the SDK, please See [MobileRTCSDKInitContext].

◆ isEnabledCustomizeMeetingUI

- (BOOL) isEnabledCustomizeMeetingUI

Queries if custom meeting UI is enabled by MobileRTC.

Returns
YES indicates enabled. Otherwise not.

◆ isRTCAuthorized

- (BOOL) isRTCAuthorized

Queries if the MobileRTC is authorized successfully or not.

Returns
YES indicates authorized successfully. Otherwise not.

◆ isSupportedCustomizeMeetingUI

- (BOOL) isSupportedCustomizeMeetingUI

Queries if custom meeting UI is supported by MobileRTC.

Returns
YES indicates support. Otherwise not.

◆ mobileRTCPresentationScene

- (UIScene *_Nullable) mobileRTCPresentationScene

Get the presentation scene of MobileRTC client.

Returns
If the function succeeds, it returns the presentation scene of MobileRTC client. Otherwise, this function fails and returns nil.

◆ mobileRTCRootController

- (UINavigationController *_Nullable) mobileRTCRootController

Gets the root navigation controller of MobileRTC client.

Returns
The root navigation controller.
Deprecated
This method is deprecated. Use mobileRTCPresentationScene instead.

◆ mobileRTCVersion

- (NSString *_Nullable) mobileRTCVersion

Gets the MobileRTC version.

Returns
The version of MobileRTC.

◆ revokeCameraControlPrivilege

- (MobileRTCSDKError) revokeCameraControlPrivilege

Revoke camera control privilege.

Returns
If the function succeeds, it returns MobileRTCSDKError_Success. Otherwise, this function returns an error.

◆ setLanguage:

- (void) setLanguage: (NSString *_Nullable) lang

Sets the MobileRTC language.

Warning
Choose one of the languages supported by MobileRTC.
Parameters
langThe specified language.

◆ setMobileRTCCustomLocalizableName:

- (void) setMobileRTCCustomLocalizableName: (NSString *_Nullable) localizableName

Sets the name of Localizable file for MobileRTC.

Warning
This method is optional, MobileRTC will read Custom Localizable file from App's main bundle first.
Parameters
localizableNameThe name of APP Localizable file for MobileRTC.

◆ setMobileRTCPresentationScene:

- (void) setMobileRTCPresentationScene: (UIScene *_Nonnull) scene

Sets the UIScene context used by the SDK. In multi-scene environments, an application may create multiple UIScene instances. This method allows you to provide the SDK with the specific scene it should use for presenting UI, handling lifecycle events, or associating with the application's environment.

Parameters
sceneThe UIScene instance to be used by the SDK.
Warning
Passing an invalid or inactive scene may cause the SDK's UI to fail to present or behave unexpectedly.

◆ setMobileRTCRootController:

- (void) setMobileRTCRootController: (UINavigationController *_Nullable) navController

Sets the MobileRTC client root navigation controller.

Parameters
navControllerThe root navigation controller for pushing MobileRTC meeting UI.
Deprecated
This method is deprecated. Use setMobileRTCPresentationScene instead.

◆ sharedRTC

+ (MobileRTC *_Nonnull) sharedRTC

Gets the MobileRTC client.

Warning
The sharedSDK will be instantiated only once over the lifespan of the application. Configure the client with the specified key and secret.
Returns
A preconfigured MobileRTC client.

◆ supportedLanguages

- (NSArray< NSString * > *_Nonnull) supportedLanguages

Gets the languages supported by MobileRTC.

Warning
The languages supported by MobileRTC are English, German, Spanish, Japanese, French, Simplified Chinese, Traditional Chinese.
Returns
An array of languages supported by MobileRTC.

◆ switchDomain:force:

- (BOOL) switchDomain: (NSString *_Nonnull) newDomain
force: (BOOL) force 

Switches the MobileRTC domain.

Parameters
newDomainThe new domain.
Returns
If the function succeeds, it returns YES. Otherwise, NO.
Warning
After switch domain, need to auth again.

◆ viewWillTransitionToSize:withTransitionCoordinator:

- (void) viewWillTransitionToSize: (CGSize) size
withTransitionCoordinator: (id< UIViewControllerTransitionCoordinator >_Nullable) coordinator 

Notifies MobileRTC when the root UIViewController's view size will change.

Parameters
sizeThe first parameter of viewWillTransitionToSize:withTransitionCoordinator.
coordinatorthe second parameter of viewWillTransitionToSize:withTransitionCoordinator.
Warning
Not work in Custom In-Meeting UI.
Call this method when the window.rootViewController recevived viewWillTransitionToSize:withTransitionCoordinator.

◆ willTransitionToTraitCollection:withTransitionCoordinator:

- (void) willTransitionToTraitCollection: (UITraitCollection *_Nullable) newCollection
withTransitionCoordinator: (id< UIViewControllerTransitionCoordinator >_Nullable) coordinator 

Notifies MobileRTC when the root UIViewController's traitCollection will change.

Parameters
newCollectionThe first parameter of willTransitionToTraitCollection:withTransitionCoordinator which is UIContentContainer method.
coordinatorThe second parameter of willTransitionToTraitCollection:withTransitionCoordinator which is UIContentContainer method.
Warning
Not work in Custom In-Meeting UI.
Call this method when the window.rootViewController recevived willTransitionToTraitCollection:withTransitionCoordinator.

Property Documentation

◆ mobileRTCCustomLocalizableName

- (NSString* _Nullable) mobileRTCCustomLocalizableName
readnonatomiccopy

The name of APP Localizable file for MobileRTC, read-only.

Definition at line 130 of file MobileRTC.h.

◆ mobileRTCDomain

- (NSString* _Nullable) mobileRTCDomain
readnonatomiccopy

MobileRTC domain, read-only.

Definition at line 120 of file MobileRTC.h.

◆ mobileRTCResPath

- (NSString* _Nullable) mobileRTCResPath
readnonatomiccopy

The path of MobileRTC Resources Bundle, read-only.

Definition at line 125 of file MobileRTC.h.