Releases: socketio/socket.io-client-swift
Releases · socketio/socket.io-client-swift
v10.2.0
v10.1.0
- Adds compression support. Use the
.compress
option to enable. - Change
connect(timeoutAfter)
to take aDouble
- Deprecates the
voipEnabled
option.
v10.0.1
- Add ability to change socketURL after init
v10.0.0
New
- socket.io 2.0+ support
Breaking changes
- unicode is no longer double encoded on the server when using polling, as such the
doubleEncodeUTF8
option has been deprecated. However this means that this is version is not backwards compatible, as unicode characters will appear garbled.
v9.0.1
- Fixes a reconnect bug
- Errors in converting
SocketData
are now reported througherrors
- Ack emits can now use custom
SocketData
v9.0.0
What's New
- Some shiny docs
- Adds a new SocketClientEvent enum that can be used to add handlers for client events. All your old style client event handlers will still be called.
Example:
socket.on(clientEvent: .connect) {data, ack in
// Your connect logic
}
- Adds a new type that can be used to check ackStatus.
- You can now specify a type conforms to SocketData and use it in emits.
Example:
struct CustomData : SocketData {
let name: String
let age: Int
func socketRepresentation() -> SocketData {
return ["name": name, "age": age]
}
}
socket.emit("myEvent", CustomData(name: "Erik", age: 24))
socket.on('myEvent', (myObject) => {
console.log(`Got custom object. ${myObject['name']} ${myObject['age']}`)
})
Breaking Changes
- The way dispatch queues has been redone. This means more work is done on the
handleQueue
. So if you had the handleQueue as the default (the main queue) it is advised that you create a specific queue for the socket, and dispatch to main from it. All interaction with the socket should be done through the queue that is passed to the socket. - Adds a new client event named
.statusChange
that is emitted whenever the client's status changes.
v8.3.3
- Revert changing doubleEncodeUTF8 default
v8.3.2
- Fix some Warnings
v8.3.1
- Bump for Swift 3.1
v8.3.0
- Turns double encoding off by default
- Fix Xcode 8.3