triniwiz / nativescript-socketio

Socket.IO for nativescript
Apache License 2.0
71 stars 31 forks source link

problem with 'emitWithAckWith' function #105

Open StephaneGNT opened 3 years ago

StephaneGNT commented 3 years ago

I am encountering an issue with socket.ios.ts, I keep getting this error TypeError: this.socket.emitWithAckWith is not a function. (In 'this.socket.emitWithAckWith(event, payload)', 'this.socket.emitWithAckWith' is undefined).

Nativescript-socketio is the last available version (3.3.1) and ios is 14.6.

Any help would be greatly welcomed !

triniwiz commented 3 years ago

Have you tried @triniwiz/nativescript-socketio ?

StephaneGNT commented 3 years ago

yes, that is specifically what i am using

triniwiz commented 3 years ago

Was wondering because you mentioned "Nativescript-socketio is the last available version (3.3.1)"

StephaneGNT commented 3 years ago

Yeah, I just realized the latest version according to your repo is not the same one than on the npm module linked to it (https://www.npmjs.com/package/nativescript-socketio) ; hence this 'mistake'. Could this have a link with this emitWithAckWith not working ?

triniwiz commented 3 years ago

That version is correct this repo is currently for {N} v6 only, newer releases can be found here

StephaneGNT commented 3 years ago

Yes, I am precisely working with {N} v6 (6.5.4 to be exact)

triniwiz commented 3 years ago

Ah okay you can still try the @triniwiz version it should just work since on the older version

StephaneGNT commented 3 years ago

Okay I'll try to take a look at it and come back to you ! Thanks for your fast answer anyway !!

StephaneGNT commented 3 years ago

Hi ! Sorry to bother you again ; how can I use your new release into my project ? Should I clone it and then build it ? (Sorry, I'm really out of my comfort zone here ^^)

triniwiz commented 3 years ago

You need to install @triniwiz/nativescript-socketio an switch the imports to that

StephaneGNT commented 3 years ago

Indeed, thanks a lot for your help :) !