I try to use the Open Tok library in Swift through the Flutter platform channel to call the native IOS code.
[ERROR] rumor_client_v1.c:274 - otk_rumor_v1_client_send (pClient == NULL) rumor client is not initialized and cannot send message
Can't figure it out what is causing it.
I tried to test their sample but I'm getting the same error. Even a clean/new project is resulting in the same.
Current setup:
*********************** OpenTok iOS SDK **************************** **** Version/Revision: ios-2.22.3/86d684fa2c49c335cc63ce5c52f57fd8610db130 **** Library built on: May 17 2022 **** Copyright 2022 Vonage **** Licensed under the Apache License, Version 2.0 ****
Xcode 14.1 on mac os 12.6
My code :
print("initSession")
let args = call.arguments as! [String: Any]
let apiKey = args["apiKey"] as! String
let sessionId = args["sessionId"] as! String
let token = args["token"] as! String
var error: OTError?
let session = OTSession(apiKey: apiKey, sessionId: sessionId, delegate: self)!
print("My session id" + session.sessionId)
// try to connect to the session with the token
session.connect(withToken: token, error: &error)
if let error = error {
print("Error connecting to session: \(error.localizedDescription)")
}
result :
the print of the session returns the session id
If I find the solution I will post it to you