socket.io-client-swift-example icon indicating copy to clipboard operation
socket.io-client-swift-example copied to clipboard

Crash: [TicTacIOiOS.ViewController btnClicked:]: unrecognized selector

Open nikunjazilen opened this issue 8 years ago • 2 comments

Hi,

I successfully setup all configuration steps and also its connected to my local machine but when I tap on any button its crashed due to the above reason. Also, I checked its properly connected the action but still its crashed. Can you please help me to resolve this issue?

Log: Attempting to connect to http://192.168.5.60:8900 Optional(<SocketIO.SocketIOClient: 0x15e62520>)

Thanks Nikunj

nikunjazilen avatar Feb 08 '17 07:02 nikunjazilen

Just add a "_" before the parameter of the function. It should read: _ btn: UIButton Syntax changed from Swift 2.x to Swift 3 and this creates a runtime error in the ObjC runtime.

nkanellopoulos avatar Feb 24 '17 11:02 nkanellopoulos

Hi,

Thanks for the reply. Issue resolved.

nikunjazilen avatar Feb 27 '17 13:02 nikunjazilen