AgoraARKit
public class AgoraARKit
The AgoraARKit
object provides static properties to be used when initializing the Agora engine
-
The
agoraAppId
is 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
theagoraAppId
can be set within theAppDelegate
or within anyViewController
, the only requirement is that theagoraAppId
is set before joining a channel. This takes place within theviewWillAppear
fucntion for bothARBroadcaster
orARAudience
ViewControllersWarning
This value defaults to nil, and will throw a runtime error if not set.Declaration
Swift
public static var agoraAppId: String!
-
The
agoraToken
is 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 isnil
AgoraARKit.agoraToken = "<Your Agora Token>"
Note
TheagoraToken
can be set within theAppDelegate
or within anyViewController
, the only requirement is that theagoraToken
is set before joining a channel. This takes place within theviewWillAppear
fucntion for bothARBroadcaster
orARAudience
ViewControllersWarning
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?