AgoraARKit
public class AgoraARKit
The AgoraARKit object provides static properties to be used when initializing the Agora engine
-
The
agoraAppIdis a static value that is used to connect to the Agora.io service. Get your Agora App Id from https://console.agora.ioAgoraARKit.agoraAppId = "<Your Agora APP ID>"Note
theagoraAppIdcan be set within theAppDelegateor within anyViewController, the only requirement is that theagoraAppIdis set before joining a channel. This takes place within theviewWillAppearfucntion for bothARBroadcasterorARAudienceViewControllersWarning
This value defaults to nil, and will throw a runtime error if not set.Declaration
Swift
public static var agoraAppId: String! -
The
agoraTokenis a static value that is used to as the user’s channel token. You can set either a dynamic token or a temp token. Generate a temp token usic https://console.agora.io. Default isnilAgoraARKit.agoraToken = "<Your Agora Token>"Note
TheagoraTokencan be set within theAppDelegateor within anyViewController, the only requirement is that theagoraTokenis set before joining a channel. This takes place within theviewWillAppearfucntion for bothARBroadcasterorARAudienceViewControllersWarning
You must set a token if you have enabled the certificate on the channel.- If you have not enabled certificate security on your AppiId, then you do not need to set this value.
Declaration
Swift
public static var agoraToken: String?
AgoraARKit Class Reference