微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决RTCClient :您必须登录才能使用聊天 API

调用下面的代码以使用 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)
    })

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。