swift2 - Pusher Websocket not connecting after migration to Swift 2 -
i using starscream , pusher-swift in app i've made month ago xcode 6, working fine, pusher connected , able receive messages.
after xcode updated 7 because forgot turn off computer, , after spent week sorting out 19375891237849 errors, i'm stuck @ websocket part of application doesn't want connect.
no errors thrown. pusher thinks it's connected (pusherconnection.connected set true) can't subscribe channel , no errors pop up.
i looking @ starscream code, can't seem manage figure out what's going on.
has seen happening xcode 7?
is there maybe setting (like instance nsallowsarbitraryloads setting allow loading objects via http) blocks websockets default? (not can imagine why apple such thing, maybe started hiring developers microsoft or something).
the problem within pusherswift:
private func handleconnectionestablishedevent(json: pushereventjson) { if let data = json["data"] as? dictionary<string, anyobject> { if let socketid = data["socket_id"] as? string { //if let connectiondata = getpushereventjsonfromstring(data), socketid = connectiondata["socket_id"] as? string { // fail silently. self.connected = true self.socketid = socketid (_, channel) in self.channels.channels { if !channel.subscribed { if !self.authorize(channel) { print("unable subscribe channel: \(channel.name)") } else { print("subscribed \(channel.name)") } } } } else { print("no connection data 2") } } else { print("no connection data 1") } }
Comments
Post a Comment