Agora RTC Objective-C API Reference Refactor

Data Fields
RtcEngineContext Struct Reference

## Data Fields
IRtcEngineEventHandler * | eventHandler
const char * | appId
void * | context
CHANNEL_PROFILE_TYPE | channelProfile
const char * | license
AUDIO_SCENARIO_TYPE | audioScenario
unsigned int | areaCode
commons::LogConfig | logConfig
Optional< THREAD_PRIORITY_TYPE > | threadPriority
bool | useExternalEglContext
bool | domainLimit
bool | autoRegisterAgoraExtensions

## Constructor & Destructor Documentation

## ◆ RtcEngineContext()

RtcEngineContext | ( |  | ) |
| inline

## Field Documentation

## ◆ eventHandler

IRtcEngineEventHandler* eventHandler

The event handler for `IRtcEngine`. See `IRtcEngineEventHandler`.

## ◆ appId

const char* appId

The App ID issued by Agora for your project. Only users in apps with the same App ID can join the same channel and communicate with each other. An App ID can only be used to create one `IRtcEngine` instance. To change your App ID, call `release` to destroy the current `IRtcEngine` instance, and then create a new one.

## ◆ context

void* context

- For Windows, it is the window handle of the app. Once set, this parameter enables you to connect or disconnect the video devices while they are powered.
- For Android, it is the context of Android Activity.

## ◆ channelProfile

CHANNEL_PROFILE_TYPE channelProfile

The channel profile. See `CHANNEL_PROFILE_TYPE`.

## ◆ license

const char* license

The license used for verification when connectting channel. Charge according to the license

## ◆ audioScenario

AUDIO_SCENARIO_TYPE audioScenario

The audio scenarios. Under different audio scenarios, the device uses different volume types. See `AUDIO_SCENARIO_TYPE`.

## ◆ areaCode

unsigned int areaCode

The region for connection. This is an advanced feature and applies to scenarios that have regional restrictions. For details on supported regions, see `AREA_CODE`. The area codes support bitwise operation.

## ◆ logConfig

commons::LogConfig logConfig

Sets the log file size. See `LogConfig`. By default, the SDK generates five SDK log files and five API call log files with the following rules:

- The SDK log files are: `agorasdk.log`, `agorasdk.1.log`, `agorasdk.2.log`, `agorasdk.3.log`, and `agorasdk.4.log`.
- The API call log files are: `agoraapi.log`, `agoraapi.1.log`, `agoraapi.2.log`, `agoraapi.3.log`, and `agoraapi.4.log`.
- The default size of each SDK log file and API log file is 2,048 KB. These log files are encoded in UTF-8.
- The SDK writes the latest logs in `agorasdk.log` or `agoraapi.log`.
- When `agorasdk.log` is full, the SDK processes the log files in the following order:1. Delete the `agorasdk.4.log` file (if any).

1. Rename `agorasdk.3.log` to `agorasdk.4.log`.
2. Rename `agorasdk.2.log` to `agorasdk.3.log`.
3. Rename `agorasdk.1.log` to `agorasdk.2.log`.
4. Create a new `agorasdk.log` file.

- The overwrite rules for the `agoraapi.log` file are the same as for `agorasdk.log`.

## ◆ threadPriority

Optional<THREAD_PRIORITY_TYPE> threadPriority

Thread priority for SDK common threads

## ◆ useExternalEglContext

bool useExternalEglContext

Whether to use egl context in the current thread as sdk's root egl context, which is shared by all egl related modules. eg. camera capture, video renderer.

Note
  This property applies to Android only.

## ◆ domainLimit

bool domainLimit

Whether to enable domain name restriction:

- `true`: Enables the domain name restriction. This value is suitable for scenarios where IoT devices use IoT cards for network access. The SDK will only connect to servers in the domain name or IP whitelist that has been reported to the operator.
- `false`: (Default) Disables the domain name restriction. This value is suitable for most common scenarios.

## ◆ autoRegisterAgoraExtensions

bool autoRegisterAgoraExtensions

Whether to automatically register the Agora extensions when initializing `IRtcEngine`:

- `true`: (Default) Automatically register the Agora extensions when initializing `IRtcEngine`.
- `false`: Do not register the Agora extensions when initializing `IRtcEngine`. You need to call `enableExtension` to register the Agora extensions.