Audio-only demo project. Uses AgoraAudio_iOS — the video module is not available.
Use this project only when the PRD is explicitly audio-only.
pod install # install CocoaPods dependencies
# Then open APIExample-Audio.xcworkspace in Xcode and build (Cmd+B)Edit APIExample-Audio/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-Audio/Examples/Basic/orAPIExample-Audio/Examples/Advanced/:<ExampleName>.swiftcontaining both<ExampleName>Entryand<ExampleName>MainclassesBase.lproj/<ExampleName>.storyboardwith two scenes: Entry and Main
-
Add a
MenuItemto themenusarray inAPIExample-Audio/ViewController.swift:MenuItem(name: "My New Case".localized, storyboard: "MyNewCase", controller: "MyNewCase")
-
Build and run — the case appears in the list.
- Do NOT call
enableVideo(),setupLocalVideo(),setupRemoteVideo(), or any camera-related APIs —AgoraAudio_iOShas no video module and will crash at runtime. - Do NOT add video, screen sharing, or beauty cases — use
APIExample/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 microphone permission before calling
joinChannel(). Audio cases only needRECORD_AUDIO.
ARCHITECTURE.md— full directory layout, case registration internals, Entry/Main pattern details