Full demo project. Covers all Agora RTC APIs using UIKit + Swift. Default project when the PRD does not specify a platform variant.
pod install # install CocoaPods dependencies
# Then open APIExample.xcworkspace in Xcode and build (Cmd+B)Edit APIExample/Common/KeyCenter.swift:
static let AppId: String = "YOUR_APP_ID"
static let Certificate: String? = nil // leave nil if App Certificate is not enabledSee ARCHITECTURE.md for the full registration mechanism. The required steps are:
-
Create an example folder under
APIExample/Examples/Basic/orAPIExample/Examples/Advanced/:<ExampleName>.swiftcontaining both<ExampleName>Entryand<ExampleName>MainclassesBase.lproj/<ExampleName>.storyboardwith two scenes: Entry (EntryViewController) and Main (<ExampleName>)
-
Add a
MenuItemto themenusarray inAPIExample/ViewController.swift:MenuItem(name: "My New Case".localized, storyboard: "MyNewCase", controller: "MyNewCase")
-
Build and run — the case appears in the list.
- Do NOT add audio-only cases that require
AgoraAudio_iOSexclusivity — useAPIExample-Audio/instead. - Do NOT use SwiftUI — this project is UIKit + Storyboards only.
- Do NOT introduce Objective-C files — this project is Swift only.
- Each case must create and destroy its own
AgoraRtcEngineKitinstance. - Always call
agoraKit.leaveChannel()beforeAgoraRtcEngineKit.destroy()when the screen is dismissed. AgoraRtcEngineDelegatecallbacks may arrive on a background thread — dispatch UI updates to the main thread.- Always request camera/microphone permissions before calling
joinChannel().
ARCHITECTURE.md— full directory layout, case registration internals, Entry/Main pattern details