Closed c1tt1 closed 7 years ago
I'm also getting the same error while running the demo app file:///app/tns_modules/nativescript-socketio/socketio.js:81:38: JS ERROR TypeError: this.socket.emitWithItems is not a function. (In 'this.socket.emitWithItems(event, payload)', 'this.socket.emitWithItems' is undefined)
Please help.
@nalinimanduva add this to your podfile and pod install
maybe that would help
target "app" do
# Begin Podfile - /Users/tviel/Projects/pursUe/app/node_modules/nativescript-google-maps-sdk/platforms/ios/Podfile
pod 'GoogleMaps'
# End Podfile
# Begin Podfile - /Users/tviel/Projects/pursUe/app/node_modules/nativescript-socketio/platforms/ios/Podfile
#pod 'Socket.IO-Client-Swift', :git => 'https://github.com/socketio/socket.io-client-swift.git'
pod 'Socket.IO-Client-Swift', :git => 'https://github.com/socketio/socket.io-client-swift.git', :branch => 'swift2.3'
# End Podfile
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3'
end
end
end
@per19 i think everything should be working with the latest update
@per19 @triniwiz i reverted the pod version back. it works
@triniwiz @roblav96 for some when I updated it idid not work for me. I had to update the pod script with the above.
@per19 I'll have to double check their source code. This might have been a mistake by me :X
@roblav96 the method changed i started to do some updates but they were failing with the ack method but they where changed to => emitWithAckWith(event, payload).timingOutAfterCallback()
& emitWith(event, payload)
I am having this issue, I have just started using it today. On my package.json, the version is: "nativescript-socketio": "^2.4.0" The code that cause the issue is: this.socket.emit('getAllRooms', userid);
There seem to an issue the socket.ios.ts, I keep getting this error
TypeError: this.socket.emitWithItems is not a function. (In 'this.socket.emitWithItems(event, payload)', 'this.socket.emitWithItems' is undefined)
.After stepping through debugging the code it takes to the
this.socket.emitWithItems(event, payload);
inside thesocket.ios.ts
file which logs the above message.I then added at the following to my Podfile but still have the same issue.