RTCClient :您必须登录才能使用聊天 API

时间:2021-01-29 13:20:59

标签: ios swift cocoa-touch quickblox

调用下面的代码以使用 QuickBlox 开始视频通话,但即使在调用登录 API 后仍出现“您必须登录才能使用聊天 API”错误。

        //Authorise user/Create session
    QBRequest.logIn(withUserLogin: userDef.value(forKey: "userID") as! String, password: ConstantObjectFile.quickBloxPassWord, successBlock: { [self] (response, user) in
        print(response)
        print(user)

        //Initiate call
        let idd = "125914156"//self.contactListArray[sender.tag].following_user_id
        let myNumber = Int(idd)!
        let opponentsIDs = [myNumber]
        let newSession = QBRTCClient.instance().createNewSession(withOpponents: opponentsIDs as [NSNumber], with: .video)
        // userInfo - the custom user information dictionary for the call. May be nil.



        let userInfo = ["key":"value"] // optional
        newSession.startCall(userInfo)

    }, errorBlock: { (response) in
        print(response)
    })

0 个答案:

没有答案