ios - definition conflicts with previous value - Xcode 6.3.2 -


i'm developing ios application in swift, socket.io library classes written in objective c.

when updated xcode 6.3.2, i'm getting lot of errors

@protocol socketiodelegate <nsobject> @optional - (void) socketio:(socketio *)socket didreceivemessage:(socketiopacket *)packet; - (void) socketio:(socketio *)socket didreceivejson:(socketiopacket *)packet; - (void) socketio:(socketio *)socket didreceiveevent:(socketiopacket *)packet; - (void) socketio:(socketio *)socket didsendmessage:(socketiopacket *)packet; - (void) socketio:(socketio *)socket onerror:(nserror *)error; - (void) socketio:(socketio *)socket onfailwitherror:(nserror *)error; @end 

when implementing these delegate methods in swift class i'm getting "definition conflicts previous value"

the implemented delegate methods in swift like:

func socketio(socket: socketio!, onfailwitherror error: nserror!) {}  func socketio(socket: socketio!, onerror error: nserror!){}  func socketio(socket: socketio!, didreceiveevent packet: socketiopacket!) {} 

how solve issue?

using xcode 6.3.2 , implementing delegate methods worked fine me.

i reproduce error message mentioned after reading question here: unable overload function in viewdidload() in swift

this indeed fails compile me definition conflicts previous value:

func whatever() {     func socketio(socket: socketio!, onfailwitherror error: nserror!) {}      func socketio(socket: socketio!, onerror error: nserror!){}      func socketio(socket: socketio!, didreceiveevent packet: socketiopacket!) {} } 

so try move implementation of delegate methods out of function, that's issue on side too.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -