File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -226,11 +226,22 @@ -(void) createURLs
226
226
urlPollingComponent.scheme = @" http" ;
227
227
}
228
228
229
- for (NSString *key in _connectParams.allKeys ) {
230
- NSString *value = _connectParams[key];
229
+ for (id key in _connectParams.allKeys ) {
231
230
NSString *encodedKey = [key urlEncode ];
232
- NSString *encodedValue = [value urlEncode ];
233
- [queryString appendFormat: @" &%@ =%@ " , encodedKey, encodedValue];
231
+ id value = _connectParams[key];
232
+ if ([value isKindOfClass: [NSString class ]]) {
233
+ NSString *encodedValue = [(NSString *)value urlEncode ];
234
+ [queryString appendFormat: @" &%@ =%@ " , encodedKey, encodedValue];
235
+ }
236
+ else if ([value isKindOfClass: [NSArray class ]]){
237
+ NSArray *array = value;
238
+ for (id item in array) {
239
+ if ([item isKindOfClass: [NSString class ]]) {
240
+ NSString *encodedValue = [item urlEncode ];
241
+ [queryString appendFormat: @" &%@ =%@ " , encodedKey, encodedValue];
242
+ }
243
+ }
244
+ }
234
245
}
235
246
236
247
urlWebSocketComponent.percentEncodedQuery = [NSString stringWithFormat: @" transport=websocket%@ " ,queryString];
Original file line number Diff line number Diff line change 1
1
Pod ::Spec . new do |s |
2
2
s . name = "VPSocketIO"
3
- s . version = "1.0.4 "
3
+ s . version = "1.0.5 "
4
4
s . summary = "Socket.IO client for iOS"
5
5
s . description = <<-DESC
6
6
Socket.IO-client for iOS.
You can’t perform that action at this time.
0 commit comments