QuickBlox / quickblox-ios-sdk

QuickBlox iOS SDK for messaging and video calling
https://quickblox.com/developers/IOS
MIT License
397 stars 358 forks source link

RTCClient : You have to be logged in in order to use Chat API #1264

Closed akshaySwarajya closed 1 year ago

akshaySwarajya commented 3 years ago

Calling below code to start video call using QuickBlox, But getting 'You have to be logged in in order to use Chat API' error even after calling login API.

`

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)
})`
stephanoparaskeva commented 3 years ago

Hey please join a Community made QuickBlox Slack so we can help each other on the QB platform:

https://join.slack.com/t/quickbloxcommunity/shared_invite/zt-q0s3bx3b-YzacqhEfPeBGbEdgEtFr1g

stensmir commented 3 years ago

Need call QBChat.instance.connect... after QBRequest.logIn and before create new session

ghost commented 2 years ago

@akshaySwarajya Hello,

This is Nikolay from QuickBlox support.

Please let me know if the issue is still relevant and if you tried the solution provided in the previous comment.