Skip to content

Instantly share code, notes, and snippets.

@zontan zontan/AgoraVideoViewController.swift Secret

Last active Jun 24, 2020
Embed
What would you like to do?
import AgoraRtcKit
let appID = "YourAppIDHere"
var agoraKit: AgoraRtcEngineKit?
let tempToken: String? = nil //If you have a token, put it here.
var userID: UInt = 0 //This tells Agora to generate an id for you. If you have unique user IDs already, you can use those.
...
private func getAgoraEngine() -> AgoraRtcEngineKit {
if agoraKit == nil {
agoraKit = AgoraRtcEngineKit.sharedEngine(withAppId: appID, delegate: self)
}
return agoraKit!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.