Closed
Description
I have created a simple project that migrate Swift class in ObjC project to connect with a specific IP and port and I have noticed that when I initial the SocketIOClient local variable it doesn't fire (Doesn't work ) but for global variable it crashed at the method as below:
dispatch_async(dispatch_get_main_queue()) {[weak self] in
if let this = self {
this.pingTimer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(this.pingInterval!),
target: this,
selector: Selector("sendPing"), userInfo: nil, repeats: true)
}
}