Hi,
I would open not an issue here, if I had not already spent many days on it.
First I have installed the Ti.WS module from github. Because the embedded socket.io module makes trouble I use the version 0.9.10 from here. This (titanium adapted ) version of lib uses socket.io_v0.9.11.
That's why I installed on server the package with:
nmp install socket.io@0.9.11This is my simple titanium code on client:
var Cligga = function() { this.eventhandlers = []; // collector of hooks var that = this; this.socket = require('vendor/socket.io.0.9.10') .connect('ws://134.100.29.95:1334'); console.log('Info: socket connected ~~~~~~~' + this.socket); this.socket.on('connect', function () { Ti.API.log('connected!'); }); this.socket.on('voter_joined', function(_payload) { }); }The standard socket.io - server is here on github.
ANDROID: works like a charme.
iOS: the app craches after connecting.
Here the outout of android request on server:
debug: client authorized info: handshake authorized crqMwdAhZnSJ_AVsPKBd debug: setting request GET /socket.io/1/websocket/crqMwdAhZnSJ_AVsPKBd debug: client authorized for debug: websocket writing 1::and the same if iOS connect:
debug: client authorized info: handshake authorized lTC9by6zi_2KS25SPKBc debug: websocket writing 2::As you can see: on iOS the line
setting request GET /socket.io/1/websocket/crqMwdAhZnSJ_AVsPKBdis missing.
What can I do – any suggestions?