Skip to main content
Apple platforms have two SMeeting SDKs. Decide which one you need first. This page covers the Objective-C MeetingKit (distributed via CocoaPods, iOS only). There’s also a native Swift SDK (import SMeeting, distributed as a Swift Package, supporting both iOS and macOS); see Swift SDK.We recommend the Swift SDK for new projects. The two APIs can’t be mixed, and don’t add both to the same project.

Prerequisites

  • iOS 16.0 or later (starting with 2.1.0; previously iOS 10.0)
  • Xcode 14.0 or later
Starting with 2.1.0, the SDK has built-in virtual background, and the minimum system requirement is raised from iOS 10.0 to iOS 16.0. Both IPHONEOS_DEPLOYMENT_TARGET in your project and platform :ios in your Podfile must be at least 16.0; otherwise the dependency can’t be resolved.The virtual background inference engine onnxruntime-c is pulled in transitively by the RTCEngineKit podspec, so you don’t need to declare it in your Podfile.
Starting with 2.0.0, the SDK is split into two layers: MeetingKit is a global singleton responsible for login, IM, meeting queries and scheduling, shared devices (camera, audio routing, screen capture), and creating room instances; MeetingKitRoom is a room instance responsible for entering and exiting the room and all in-meeting operations. The same account can create multiple room instances and be in multiple rooms at the same time.

Step 1: Import the SDK and set app permissions

Import the SDK

1. Add the following dependency to your Podfile.
2. Run the following command to install the SDK.
Note: If you can’t install the latest version of MeetingKit, run the following command to update your local CocoaPods repo list:
If you still can’t get the latest version, try specifying the MeetingKit source:
3. Import the header wherever you use MeetingKit.

Configure app permissions

Audio and video features require permission to use the microphone, camera, and photo library. Add the following entries to your app’s Info.plist; they are the prompts shown in the system authorization dialogs for the microphone, camera, and photo library respectively.

Step 2: Log in and log out

Log in

Before calling any other SDK function, you need to log in to the SDK. Add the following code to your project; it calls the relevant MeetingKit API to initialize the conferencing SDK. This step is essential, because MeetingKit features only work after login succeeds:
enableLocalLog defaults to YES. When enabled, logs from the whole process are captured to a local file, and the host app’s console output is kept. The login API without the logConfig parameter also uses this default.

Log out

Step 3: Create a room

Build meeting parameters

Meeting parameters consist of many fields, but you usually only need a few of them. For details, see SEAMeetingParam.
  • The following table describes some properties of the SEAMeetingParam object.

Create the room

After creating the SEAMeetingParam object, call the SDK’s createRoom function to create a cloud meeting room.

Step 4: Create a room instance and enter the room

Starting with 2.0.0, all in-meeting operations and events are scoped to a room. Before entering a room, create a MeetingKitRoom instance with createRoomWithDelegate:, passing in the room event delegate when you create it.

Set delegates

The SDK has two event protocols; implement each according to which events it owns:
  • MeetingKitDelegate: global events (audio route changes, app performance), set with addDelegate:;
  • MeetingKitRoomDelegate: in-room events (entering and exiting the room, member state, messages, cloud recording, stream quality, etc.), passed in when you create the room instance.

Create a room instance

To be in multiple rooms at the same time, call createRoomWithDelegate: multiple times and hold each instance separately. The media and business state of each room are independent of each other.

Implement event callbacks

The first parameter of every MeetingKitRoomDelegate callback is the room instance the event comes from, which tells you which room an event belongs to when you’re in multiple rooms. The room number and meeting ID can be read from room.roomNo and room.meetingId.
  • Error event callback
  • Enter room event callback
  • Remote user entered the room callback
  • Remote user exited the room callback
  • User camera state changed callback
  • User microphone state changed callback

Build meeting entry parameters

When calling the enterRoom API, fill in the key SEAMeetingEnterParam parameters. For details, see SEAMeetingEnterParam.

Enter the room

After creating the SEAMeetingEnterParam object, call the SDK’s enterRoom function to enter the cloud meeting room.
Note that this method’s success callback doesn’t reflect whether you actually entered the room; it only means the API call itself completed. To confirm that you really entered the room, listen for the onEnterRoom event through the delegate above.

Exit the room

Calling this API makes the user exit their current room and releases device resources such as the camera, microphone, and speaker. Once the resources are released, the SDK notifies you through the onSuccess callback. If you want to call enterRoom:() again, we recommend waiting for the onSuccess callback before doing anything else, to avoid problems such as the camera or microphone being occupied.
The room instance becomes invalid after exitRoom: is called. To enter the meeting again, create a new instance with createRoomWithDelegate:. Calling logout exits and destroys all room instances, so you don’t need to exit each one.

Step 5: Turn the camera on and off

After you request to turn the camera on or off, the service determines the user’s camera state through its own logic. The SDK then receives the onUserCameraStateChanged event.

Turn on the camera

Turn off the camera

Note that the success callbacks of the methods above don’t reflect the actual camera state; they only mean the API call itself completed. To keep the camera state consistent between the client and the server, listen for the onUserCameraStateChanged event through the delegate.

Step 6: Turn the microphone on and off

After you request to turn the microphone on or off, the service determines the user’s microphone state through its own logic. The SDK then receives the onUserMicStateChanged event.

Turn on the microphone

Turn off the microphone

Note that the success callbacks of the methods above don’t reflect the actual microphone state; they only mean the API call itself completed. To keep the microphone state consistent between the client and the server, listen for the onUserMicStateChanged event through the delegate.

Step 7: Subscribe to and unsubscribe from remote user video

Subscribe to remote user video

  • The following table describes all values of the SEAVideoStreamType video stream type.

Unsubscribe from remote user video

Unsubscribe from all video of a specific remote user

Unsubscribe from all remote users’ video

The SDK doesn’t provide an API to unsubscribe from all members at once. Iterate over the member list and call stopAllRemoteViewWithUserId: for each one.
Note: after you unsubscribe from a member’s video, the SDK releases the rendering view itself.