I am following the Agora.io channel management guide for joining a channel using AgoraRtcEngineKit for iOS. It states that I should call createRtcChannel of the AgoraRtcEngineKit class to create an AgoraRtcChannel object with a channel ID. However, AgoraRtcEngineKit does not have a createRtcChannel method in Swift. The alternative is that I use Obj-C code, but this seems a little hacky.
Second, following the token generation reference, I need to generate a server token using RtcTokenBuilder. It states "your token needs to be generated on your own server, hence you are required to first deploy a token generator on the server." Ideally, I would be able to generate a token in Swift, but the only available languages for the source code is C++, Java, Python, PHP, Node.js, Go, Ruby. I assume I can do this with JavaScriptCore, but, like with the channel generation, this doesn't seem like an optimal solution.
Per the documentation:
After a token (or a temporary token) is generated, the client should use the token to join a channel within 24 hours. Otherwise, you need to generate a new token (or temporary token).
A token (or a temporary token) expires after a certain period of time. When the SDK notifies the client that the token is about to expire or has expired by the onTokenPrivilegeWillExpire or onTokenExpired callbacks, you need to generate a new token and call the renewToken method.
The token encoding uses the standard HMAC/SHA1 approach and the libraries are available on common server-side development platforms, such as Node.js, Java, PHP, Python, and C++.
What is the standard way to generate a channel and token to join channel using AgoraRtcEngineKit in iOS Swift via Agora.io?
Thanks in advance!