I am working with iOS 8 and Swift. I want to use the official socket.io client but for some reason it does not attempt to connect. I followed the example given here: https://github.com/socketio/socket.io-client-swift
let socket = SocketIOClient(socketURL: "\(CurrentConfiguration.serverURL)") //url = "http://x.x.x.x:3000" socket.reconnects = true socket.reconnectWait = 10 socket.nsp = "/messagelist" // Connect socket.connect() socket.onAny {println("got event: \($0.event) with items \($0.items)")} //added this after reading issues on github to at least log anything socket.on("connect") {data, ack in println("socket connected") } socket.on("error") {data in println("socket ERROR") println(data) } let socket = SocketIOClient(socketURL: "\(CurrentConfiguration.serverURL)") socket.reconnects = true socket.reconnectWait = 10 socket.nsp = "/messagelist" // Connect socket.connect() socket.onAny {println("got event: \($0.event) with items \($0.items)")} socket.on("connect") {data, ack in println("socket connected") } socket.on("error") {data in println("socket ERROR") println(data) } canCan anyone confirm this? Is this a version Problemproblem or maybe related to Swift 1.2?
On the server side i cant even recognize a connection attempt. The variable serverURL is the same as i had before, using a different library. and