You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* development:
bump websocket version
bump websocket version
Fix#521
add options to objective-c test
add link to spm example
remove redundant cast
remove redundant cast
Redo emitWithAck API since in Swift 3 parameter names aren't apart of the type
[ack with:@[@"Got your currentAmount, ", @"dude"]];
46
47
}];
@@ -94,7 +95,7 @@ Carthage
94
95
-----------------
95
96
Add this line to your `Cartfile`:
96
97
```
97
-
github "socketio/socket.io-client-swift" ~> 8.0.2 # Or latest version
98
+
github "socketio/socket.io-client-swift" ~> 8.0.3 # Or latest version
98
99
```
99
100
100
101
Run `carthage update --platform ios,macosx`.
@@ -107,7 +108,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`:
107
108
use_frameworks!
108
109
109
110
target 'YourApp'do
110
-
pod 'Socket.IO-Client-Swift', '~> 8.0.2'# Or latest version
111
+
pod 'Socket.IO-Client-Swift', '~> 8.0.3'# Or latest version
111
112
end
112
113
```
113
114
@@ -136,7 +137,7 @@ CocoaSeeds
136
137
Add this line to your `Seedfile`:
137
138
138
139
```
139
-
github "socketio/socket.io-client-swift", "v8.0.2", :files => "Source/*.swift" # Or latest version
140
+
github "socketio/socket.io-client-swift", "v8.0.3", :files => "Source/*.swift" # Or latest version
140
141
```
141
142
142
143
Run `seed install`.
@@ -182,8 +183,8 @@ Methods
182
183
3.`onAny(callback:((event: String, items: AnyObject?)) -> Void)` - Adds a handler for all events. It will be called on any received event.
183
184
4.`emit(_ event: String, _ items: AnyObject...)` - Sends a message. Can send multiple items.
184
185
5.`emit(_ event: String, withItems items: [AnyObject])` - `emit` for Objective-C
185
-
6.`emitWithAck(_ event: String, _ items: AnyObject...) -> (timeoutAfter: UInt64, callback: (NSArray?) -> Void) -> Void` - Sends a message that requests an acknowledgement from the server. Returns a function which you can use to add a handler. See example. Note: The message is not sent until you call the returned function.
186
-
7.`emitWithAck(_ event: String, withItems items: [AnyObject]) -> (UInt64, (NSArray?) -> Void) -> Void` - `emitWithAck` for Objective-C. Note: The message is not sent until you call the returned function.
186
+
6.`emitWithAck(_ event: String, _ items: AnyObject...) -> OnAckCallback` - Sends a message that requests an acknowledgement from the server. Returns an object which you can use to add a handler. See example. Note: The message is not sent until you call timingOut(after:) on the returned object.
187
+
7.`emitWithAck(_ event: String, withItems items: [AnyObject]) -> OnAckCallback` - `emitWithAck` for Objective-C. Note: The message is not sent until you call timingOutAfter on the returned object.
187
188
8.`connect()` - Establishes a connection to the server. A "connect" event is fired upon successful connection.
188
189
9.`connect(timeoutAfter timeoutAfter: Int, withTimeoutHandler handler: (() -> Void)?)` - Connect to the server. If it isn't connected after timeoutAfter seconds, the handler is called.
189
190
10.`disconnect()` - Closes the socket. Reopening a disconnected socket is not fully tested.
@@ -205,5 +206,7 @@ Client Events
205
206
##Detailed Example
206
207
A more detailed example can be found [here](https://github.com/nuclearace/socket.io-client-swift-example)
207
208
209
+
An example using the Swift Package Manager can be found [here](https://github.com/nuclearace/socket.io-client-swift-spm-example)
0 commit comments