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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -