AtomicXCore, enabling developers to rapidly build essential capabilities for large-scale webinars, company-wide meetings, or online education sessions with Atomicx. You have complete flexibility to customize the UI, allowing you to focus on business logic and user experience optimization.Host | Guest | Audience |
Host can start high-definition audio/video streaming, share screens, and manage participants. | Guest can enable their microphone for real-time voice discussions and sharing. | Supports unlimited concurrent audience entry, ultra-low latency viewing, and high-frequency chat. Audience can use "Raise Hand" to request guest access. |
![]() | ![]() | ![]() |
AtomicXCore provides all the capabilities you need to build a professional webinar solution:AtomicXCore include:RoomStore: Handles room management tasks, including create, join, and lifecycle operations.RoomParticipantStore: Manages room participants, including admin settings, guest/audience management, removing participants, device control, and more.sudo gem install cocoapods in your terminal.sudo gem install cocoapods. Enter your password as instructedpod 'AtomicXCore' to your project's Podfile:target 'YourProjectTarget' do# Other existing Pod dependencies...# Add pod 'AtomicXCore' dependencypod 'AtomicXCore'end
.xcodeproj directory using cd, then run pod init to create a Podfile. Add pod 'AtomicXCore' as follows:# If your project directory is /Users/yourusername/Projects/YourProject# 1. cd to your .xcodeproj directorycd /Users/yourusername/Projects/YourProject# 2. Run pod init. After this command, a Podfile will be generated in your project directory.pod init# 3. Add pod 'AtomicXCore' dependency to the generated Podfiletarget 'YourProjectTarget' do# Add pod 'AtomicXCore' dependencypod 'AtomicXCore'end
cd to the directory containing your Podfile, then run:pod install
Info.plist file.<key>NSCameraUsageDescription</key><string>TUIRoomKit requires access to your camera</string><key>NSMicrophoneUsageDescription</key><string>TUIRoomKit requires access to your microphone</string>

LoginStore.shared.login in your project to complete login. This is required before using any features of AtomicXCore.LoginStore.shared.login only after your application's own user account login succeeds to ensure proper login flow.import AtomicXCorefunc login() {LoginStore.shared.login(sdkAppID: 1400000001, // Replace with your project's sdkAppIDuserID: "test_001", // Replace with your project's userIDuserSig: "xxxxxxxxxxx") { result in // Replace with your project's userSigswitch result {case .success(let info):debugPrint("login success")case .failure(let error):debugPrint("login failed code:\\(error.code), message:\\(error.message)")}}}
Parameter | Type | Description |
sdkAppID | Int | |
userID | String | Unique ID for the current user. Use only English letters, numbers, hyphens, and underscores. Avoid simple IDs like 1 or 123 to prevent multi-device login conflicts. |
userSig | String | Authentication token for Tencent Cloud. For development, generate with GenerateTestUserSig.genTestSig or the UserSig Helper Tool.For production, always generate UserSig server-side to protect your SecretKey. See Server-side UserSig Generation and How to Calculate and Use UserSig. |

CreateRoomOptions to set the room name and configuration.RoomStore.createAndJoinRoom to perform the operation.import UIKitimport AtomicXCore// RoomMainViewController represents the main room view controllerclass RoomMainViewController: UIViewController {private var roomID = "webinar_123456"// Automatically create and join the room on initializationpublic init() {super.init(nibName: nil, bundle: nil)createAndJoinRoom(roomID: roomID, roomType: .webinar)}required init?(coder: NSCoder) {fatalError("init(coder:) has not been implemented")}private func createAndJoinRoom(roomID: String, roomType: RoomType) {// 1. Configure room parametersvar options = CreateRoomOptions()options.roomName = "My Webinar" // Display name for the roomoptions.password = "" // Room entry password (leave empty if not needed)// 2. Set initial room permissionsoptions.isAllCameraDisabled = falseoptions.isAllMessageDisabled = falseoptions.isAllMicrophoneDisabled = falseoptions.isAllScreenShareDisabled = false// 3. Create and join the roomRoomStore.shared.createAndJoinRoom(roomID: roomID, roomType: roomType, options: options) { [weak self] result inguard let self = self else { return }switch result {case .success():print("Successfully created and joined webinar room")case .failure(let error):print("Failed to create and join webinar room [Error Code: \\(error.code)]: \\(error.message)")}}}}
Parameter Name | Type | Required | Description |
roomID | String | Yes | Unique room identifier. 0-48 bytes. Use numbers, English letters, underscores (_), hyphens (-). Avoid spaces and Chinese characters. |
roomType | RoomType | Yes | Room type: standard: Standard room.webinar: Large webinar room.Use webinar for webinar scenarios. |
options | CreateRoomOptions | Yes | Room configuration object. See CreateRoomOptions Struct documentation. |
completion | CompletionClosure | No | Completion callback. Returns error code and message if creation fails. |
Parameter Name | Type | Required | Description |
roomName | String | No | Room name (optional, defaults to empty). 0-60 bytes. Supports English/Chinese, numbers, special characters. |
password | String | No | Room password (empty means no password). 0-32 bytes. Use 4-8 digit numbers for easy input. Avoid plain-text sensitive data. Passwords not supported for webinars; leave empty. |
isAllMicrophoneDisabled | Bool | No | Disable microphones for all. Only host/admin can open mic. Guests are muted by default. true: Disabled. false: Enabled (default). |
isAllCameraDisabled | Bool | No | Disable cameras for all. Only host/admin can open camera. Guests are video-off by default. true: Disabled. false: Enabled (default). |
isAllScreenShareDisabled | Bool | No | Disable screen sharing for all. Only host/admin can share screen. true: Disabled. false: Enabled (default). |
isAllMessageDisabled | Bool | No | Disable chat for all (mute). Members cannot send messages. true: Disabled. false: Enabled (default). |
DeviceStore.openLocalCamera and DeviceStore.openLocalMicrophone to enable local capture. Use startScreenShare to begin screen sharing (camera must be off when screen sharing starts).import UIKitimport AtomicXCore// RoomMainViewController represents the main room view controllerclass RoomMainViewController: UIViewController {private let roomID: Stringprivate static let kAppGroup = "group.com.RPLiveStreamRelease"public init(roomID: String) {self.roomID = roomIDsuper.init(nibName: nil, bundle: nil)openDevices()}required init?(coder: NSCoder) {fatalError("init(coder:) has not been implemented")}private func openDevices() {// 1. Enable front cameraDeviceStore.shared.openLocalCamera(isFront: true, completion: nil)// 2. Enable microphoneDeviceStore.shared.openLocalMicrophone(completion: nil)// 3. Start screen sharing (camera must be off for screen sharing)// DeviceStore.shared.startScreenShare(appGroup: Self.kAppGroup)}}
Parameter Name | Type | Required | Description |
isFront | Bool | Yes | Use front camera: true: Enable front camera. false: Enable rear camera . |
completion | CompletionClosure | No | Completion callback. Returns error code and message if enabling fails. |
RoomStore.endRoom. All participants will receive a room end event.import UIKitimport AtomicXCore// RoomMainViewController represents the main room view controllerclass RoomMainViewController: UIViewController {private let roomID: Stringpublic init(roomID: String) {self.roomID = roomIDsuper.init(nibName: nil, bundle: nil)endRoom()}required init?(coder: NSCoder) {fatalError("init(coder:) has not been implemented")}private func endRoom() {// endRoom permanently terminates the room.// Only the host (Owner) can perform this operation. All members are removed and audio/video is forcibly stopped.RoomStore.shared.endRoom { [weak self] result inguard let self = self else { return }switch result {case .success():print("Room ended successfully")case .failure(let error):print("Failed to end room [Error Code: \\(error.code)]: \\(error.message)")}}}}
RoomStore.joinRoom.import UIKitimport AtomicXCore// RoomMainViewController represents the main room view controllerclass RoomMainViewController: UIViewController {private let roomID = "webinar_123456"public init() {super.init(nibName: nil, bundle: nil)joinRoom(roomID: roomID, roomType: .webinar)}required init?(coder: NSCoder) {fatalError("init(coder:) has not been implemented")}private func joinRoom(roomID: String, roomType: RoomType) {// 1. Prepare join parameterslet targetRoomID = roomID // Room ID to joinlet roomPassword = "" // Room password; pass empty string or nil if not set// 2. Call RoomStore joinRoom API// Checks room existence, user ban, and password correctnessRoomStore.shared.joinRoom(roomID: targetRoomID, roomType: roomType, password: roomPassword) { [weak self] result inguard let self = self else { return }switch result {case .success():print("Joined room successfully")case .failure(let error):print("Failed to join room [Error Code: \\(error.code)]: \\(error.message)")}}}}
Parameter Name | Type | Required | Description |
roomID | String | Yes | Unique room identifier. 0-48 bytes. Use numbers, English letters, underscores (_), hyphens (-). Avoid spaces and Chinese characters. |
roomType | RoomType | Yes | Room type: standard: Standard room.webinar: Large webinar room.Use webinar for webinar scenarios. |
password | String | No | Room password (empty means no password). 0-32 bytes. Use 4-8 digits for mobile input. Avoid plain-text sensitive data. Passwords not supported for webinars; leave empty. |
completion | CompletionClosure | No | Completion callback. Returns error code and message if join fails. |
RoomStore.leaveRoom.import UIKitimport AtomicXCore// RoomMainViewController represents the main room view controllerclass RoomMainViewController: UIViewController {private let roomID: Stringpublic init(roomID: String) {self.roomID = roomIDsuper.init(nibName: nil, bundle: nil)leaveRoom()}required init?(coder: NSCoder) {fatalError("init(coder:) has not been implemented")}private func leaveRoom() {// leaveRoom is for regular members or hosts to exit the room.// If the host leaves, only they exit; the room remains active.// Stops audio/video streaming and notifies the server to remove the userRoomStore.shared.leaveRoom { [weak self] result inguard let self = self else { return }switch result {case .success():print("Left room successfully")case .failure(let error):print("Failed to leave room [Error Code: \\(error.code)]: \\(error.message)")}}}}
RoomView component encapsulates webinar streaming logic. Simply render RoomView in your page to enable audio/video capabilities for the webinar room. Video rendering uses TUIRoomKit components.RoomView built-in capabilities:RoomView is the component for rendering room video streams. For full implementation, refer to RoomView.swift in the TUIRoomKit open-source project.import UIKitimport Combineimport AtomicXCoreimport TUIRoomKit// RoomMainViewController represents the main room view controllerclass RoomMainViewController: UIViewController {private var roomID: Stringprivate var roomType: RoomTypeprivate lazy var roomView: RoomView = {let roomView = RoomView(roomID: roomID, roomType: roomType)return roomView}()init(roomID: String, roomType: RoomType) {self.roomID = roomIDself.roomType = roomTypesuper.init()view.addSubview(roomView)roomView.snp.makeConstraints { make inmake.edges.equalToSuperview()}}required init?(coder: NSCoder) { fatalError() }}
RoomParticipantStore.promoteAudienceToParticipant to promote an audience member to guest.RoomParticipantStore.demoteParticipantToAudience to demote a guest back to audience.import Combineimport AtomicXCorefunc promoteAudienceToParticipant(userID: String) {// Prerequisite: Must have entered the room.// Create RoomParticipantStore instance using roomIDvar participantStore: RoomParticipantStore = RoomParticipantStore.create(roomID: "webinar_123456")// Promote audience to guest (host/admin only)participantStore.promoteAudienceToParticipant(userID: userID) { result inswitch result {case .success():print("Promoted to guest successfully")case .failure(let err):print("Failed to promote to guest Error Code: \\(err.code), Error Message: \\(err.message)")}}}func demoteParticipantToAudience(userID: String) {// Prerequisite: Must have entered the room.// Create RoomParticipantStore instance using roomIDvar participantStore: RoomParticipantStore = RoomParticipantStore.create(roomID: "webinar_123456")// Demote guest to audience (host/admin only)participantStore.demoteParticipantToAudience(userID: userID) { result inswitch result {case .success():print("Demoted guest to audience successfully")case .failure(let err):print("Failed to demote guest to audience Error Code: \\(err.code), Error Message: \\(err.message)")}}}
RoomStore.addRoomListener to subscribe to room events via roomEventPublisher.import UIKitimport Combineimport AtomicXCore// RoomMainViewController represents the main room view controllerclass RoomMainViewController: UIViewController {private let roomID: String// Store Combine subscriptions to prevent listener lossprivate var cancellableSet = Set<AnyCancellable>()public init(roomID: String) {self.roomID = roomIDsuper.init(nibName: nil, bundle: nil)// Start event listening on initializationsubscribeRoomEvents()}required init?(coder: NSCoder) {fatalError("init(coder:) has not been implemented")}private func subscribeRoomEvents() {// Access RoomStore's roomEventPublisher// Publishes events throughout the room lifecycle (call, dissolve, reminders, etc.)RoomStore.shared.roomEventPublisher.receive(on: RunLoop.main) // Ensure UI updates on main thread.sink { [weak self] event inguard let self = self else { return }// Business logic based on event typeswitch event {case .onRoomEnded(let roomInfo):print("The current room has ended")// ... handle other RoomEvent events ...default: break}}.store(in: &cancellableSet) // Store subscription}}
Store/Component | Description | API Documentation |
RoomStore | Room lifecycle management: create/join, join, leave, end room, update/get room info, subscribe to room events (dissolution, updates) | |
RoomParticipantStore | Room member management: set admin, transfer host, get guest list, get audience list, remove from room, guest device control | |
DeviceStore | Audio/video device status and device operation APIs | |
LoginStore | AtomicXCore login: login and retrieve login user information |
rsync(xxxx):1:1: SnapKit.framework/SnapKit_Privacy.bundle/: mkpathat: Operation not permitted
rsync script during the build process, preventing copying of SnapKit_Privacy.bundle inside the framework.User Script Sandboxing (or ENABLE_USER_SCRIPT_SANDBOXING), and set it from YES to NO.Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan