Skip to content

Instantly share code, notes, and snippets.

@zontan
Last active July 6, 2020 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zontan/7d025868dbeb9ecb9365ec60d49b0796 to your computer and use it in GitHub Desktop.
Save zontan/7d025868dbeb9ecb9365ec60d49b0796 to your computer and use it in GitHub Desktop.
import AgoraRtcEngineKit
let appID = "YourAppIDHere"
var agoraKit: AgoraRtcEngineKit?
...
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