10-19-2017 06:39 AM
Problem:
Delegate "ucDidStartSession" is not called. No errors log. No failed log. App didn't crasher and remain responsive. And when method "phone.createCall" is called right after "uc.startSession" it thorws exceptions and in log "Cannot send message until websocket is open."
Start Session method:
func executeCall(_ sessionId:String) {
let uc = ACBUC.uc(withConfiguration: sessionId, delegate: self) as! ACBUC
uc.useCookies = false
uc.setNetworkReachable(true)
uc.acceptAnyCertificate(true)
uc.startSession()
ucDidStartSession:
func ucDidStartSession(_ uc: ACBUC!) {
let phone = uc.phone
var call:ACBClientCall
call = (phone?.createCall(toAddress: "######", withAudio: .sendAndReceive, video: .sendAndReceive, delegate: self))!
}
Class definition:
class CallController: BaseConroller, ACBUCDelegate, ACBClientCallDelegate {
log:
ACB client SDK version: 3.2.2.1.1
Scrambled Session ID:############
Session ID:wss://##########
***WEBSOCKET*** setNetworkReachable: 1
ignoring setNetworkReachable: 1 because reachability is already 1
***WEBSOCKET*** NTWK acceptAnyCertificate: 1
Created NSURLRequest: wss://########## with timeout of: 7.000000
Creating websocket to <NSMutableURLRequest: 0x1c000c720> { URL: wss://########## }
SocketRocket: Allowing connection to any root certificate
[SR] Don't Use Cookies
10-20-2017 06:18 AM
Hi Matous,
Looks like you are using Swift and the SDK is in Objective-C
The code looks OK. This problem occurs when the dev forgots to set the delegate first or the delegate is accidentally set on some other object. I'm not aware the SDK has been used on Swift version 4 yet.
Regards,
Rob
10-23-2017 04:10 AM
Hi Rob,
thank you for your response. Delegate gets called when I initialize ACBUC without sessionID more specifically with empty string then "ucDidFail" is called.
When I use AssistSDK. A connection is established and video view is visible on the screen but I want to change its style and size and I don't know how.
Regards,
Matous
10-24-2017 11:58 PM
Problem solved,
right now in code ACBUC is initialized in function scope and possibly destroyed after function end.
Solution is to move ACBUC var in class scope
Regards,
Matous
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide