Skip to content

Commit 6a8a5dc

Browse files
committed
Merge branch 'development'
* development: update readme Add compress to NSDictionary to option method add note about voip Add compress option Fix cocoapods add missing updates Update websocket
2 parents d09c2f0 + 8f22bde commit 6a8a5dc

11 files changed

+455
-36
lines changed

Package.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import PackageDescription
22

33
let package = Package(
4-
name: "SocketIO"
4+
name: "SocketIO",
5+
dependencies: [
6+
.Package(url: "https://github.com/daltoniam/zlib-spm.git", majorVersion: 1),
7+
.Package(url: "https://github.com/daltoniam/common-crypto-spm.git", majorVersion: 1)
8+
]
59
)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Socket.IO-client for iOS/OS X.
77
```swift
88
import SocketIO
99

10-
let socket = SocketIOClient(socketURL: URL(string: "http://localhost:8080")!, config: [.log(true), .forcePolling(true)])
10+
let socket = SocketIOClient(socketURL: URL(string: "http://localhost:8080")!, config: [.log(true), .compress])
1111

1212
socket.on(clientEvent: .connect) {data, ack in
1313
print("socket connected")
@@ -30,7 +30,7 @@ socket.connect()
3030
```objective-c
3131
@import SocketIO;
3232
NSURL* url = [[NSURL alloc] initWithString:@"http://localhost:8080"];
33-
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"forcePolling": @YES}];
33+
SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"compress": @YES}];
3434

3535
[socket on:@"connect" callback:^(NSArray* data, SocketAckEmitter* ack) {
3636
NSLog(@"socket connected");
@@ -92,7 +92,7 @@ Then import `import SocketIO`.
9292
### Carthage
9393
Add this line to your `Cartfile`:
9494
```
95-
github "socketio/socket.io-client-swift" ~> 10.0.1 # Or latest version
95+
github "socketio/socket.io-client-swift" ~> 10.1.0 # Or latest version
9696
```
9797

9898
Run `carthage update --platform ios,macosx`.
@@ -104,7 +104,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`:
104104
use_frameworks!
105105

106106
target 'YourApp' do
107-
pod 'Socket.IO-Client-Swift', '~> 10.0.1' # Or latest version
107+
pod 'Socket.IO-Client-Swift', '~> 10.1.0' # Or latest version
108108
end
109109
```
110110

@@ -132,7 +132,7 @@ Objective-C:
132132
Add this line to your `Seedfile`:
133133

134134
```
135-
github "socketio/socket.io-client-swift", "v10.0.1", :files => "Source/*.swift" # Or latest version
135+
github "socketio/socket.io-client-swift", "v10.1.0", :files => "Source/*.swift" # Or latest version
136136
```
137137

138138
Run `seed install`.

Socket.IO-Client-Swift.podspec

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "Socket.IO-Client-Swift"
33
s.module_name = "SocketIO"
4-
s.version = "10.0.1"
4+
s.version = "10.1.0"
55
s.summary = "Socket.IO-client for iOS and OS X"
66
s.description = <<-DESC
77
Socket.IO-client for iOS and OS X.
@@ -14,9 +14,14 @@ Pod::Spec.new do |s|
1414
s.ios.deployment_target = '8.0'
1515
s.osx.deployment_target = '10.10'
1616
s.tvos.deployment_target = '9.0'
17-
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v10.0.1' }
17+
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v10.1.0' }
1818
s.source_files = "Source/**/*.swift"
19+
s.libraries = 'z'
20+
s.preserve_paths = 'zlib/*'
1921
s.requires_arc = true
20-
s.pod_target_xcconfig = {'SWIFT_VERSION' => '3.1'}
22+
s.pod_target_xcconfig = {
23+
'SWIFT_VERSION' => '3.1',
24+
'SWIFT_INCLUDE_PATHS' => '$(PODS_ROOT)/Socket.IO-Client-Swift/zlib'
25+
}
2126
# s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files
2227
end

Socket.IO-Client-Swift.xcodeproj/project.pbxproj

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@
9999
74BC45AB1D0C6675008CC431 /* SocketClientManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74BC45AA1D0C6675008CC431 /* SocketClientManager.swift */; };
100100
74BC45AC1D0C6675008CC431 /* SocketClientManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74BC45AA1D0C6675008CC431 /* SocketClientManager.swift */; };
101101
74BC45AD1D0C6675008CC431 /* SocketClientManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74BC45AA1D0C6675008CC431 /* SocketClientManager.swift */; };
102+
74DA216E1F0943EE009C19EE /* include.h in Headers */ = {isa = PBXBuildFile; fileRef = 74DA216C1F09438D009C19EE /* include.h */; };
103+
74DA216F1F0943F4009C19EE /* include.h in Headers */ = {isa = PBXBuildFile; fileRef = 74DA216C1F09438D009C19EE /* include.h */; };
104+
74DA21701F0943F8009C19EE /* include.h in Headers */ = {isa = PBXBuildFile; fileRef = 74DA216C1F09438D009C19EE /* include.h */; };
105+
74DA21721F094408009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21711F094408009C19EE /* libz.tbd */; };
106+
74DA21741F09440F009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21731F09440F009C19EE /* libz.tbd */; };
107+
74DA21761F094417009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21751F094417009C19EE /* libz.tbd */; };
108+
74DA217C1F09457B009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21731F09440F009C19EE /* libz.tbd */; };
109+
74DA21811F094887009C19EE /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74DA21801F094887009C19EE /* Compression.swift */; };
110+
74DA21821F094887009C19EE /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74DA21801F094887009C19EE /* Compression.swift */; };
111+
74DA21831F094887009C19EE /* Compression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74DA21801F094887009C19EE /* Compression.swift */; };
102112
74F124F01BC574CF002966F4 /* SocketBasicPacketTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F124EF1BC574CF002966F4 /* SocketBasicPacketTest.swift */; };
103113
74F124F11BC574CF002966F4 /* SocketBasicPacketTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F124EF1BC574CF002966F4 /* SocketBasicPacketTest.swift */; };
104114
CEBA569A1CDA0B8200BA0389 /* SocketExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEBA56991CDA0B8200BA0389 /* SocketExtensions.swift */; };
@@ -175,6 +185,13 @@
175185
749642B41D3FCE5500DD32D1 /* WebSocket.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WebSocket.swift; path = Source/WebSocket.swift; sourceTree = "<group>"; };
176186
74ABF7761C3991C10078C657 /* SocketIOClientSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SocketIOClientSpec.swift; path = Source/SocketIOClientSpec.swift; sourceTree = "<group>"; };
177187
74BC45AA1D0C6675008CC431 /* SocketClientManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SocketClientManager.swift; path = Source/SocketClientManager.swift; sourceTree = "<group>"; };
188+
74DA216C1F09438D009C19EE /* include.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = include.h; path = zlib/include.h; sourceTree = "<group>"; };
189+
74DA21711F094408009C19EE /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
190+
74DA21731F09440F009C19EE /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
191+
74DA21751F094417009C19EE /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS10.2.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
192+
74DA21771F09444E009C19EE /* module.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = zlib/module.modulemap; sourceTree = "<group>"; };
193+
74DA217D1F0945E9009C19EE /* libcommonCrypto.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcommonCrypto.tbd; path = usr/lib/system/libcommonCrypto.tbd; sourceTree = SDKROOT; };
194+
74DA21801F094887009C19EE /* Compression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Compression.swift; path = Source/Compression.swift; sourceTree = "<group>"; };
178195
74F124EF1BC574CF002966F4 /* SocketBasicPacketTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketBasicPacketTest.swift; sourceTree = "<group>"; };
179196
CEBA56991CDA0B8200BA0389 /* SocketExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SocketExtensions.swift; path = Source/SocketExtensions.swift; sourceTree = "<group>"; };
180197
/* End PBXFileReference section */
@@ -184,6 +201,7 @@
184201
isa = PBXFrameworksBuildPhase;
185202
buildActionMask = 2147483647;
186203
files = (
204+
74DA21721F094408009C19EE /* libz.tbd in Frameworks */,
187205
6CA08A961D615C040061FD2A /* Security.framework in Frameworks */,
188206
);
189207
runOnlyForDeploymentPostprocessing = 0;
@@ -200,6 +218,7 @@
200218
isa = PBXFrameworksBuildPhase;
201219
buildActionMask = 2147483647;
202220
files = (
221+
74DA21741F09440F009C19EE /* libz.tbd in Frameworks */,
203222
6CA08A981D615C0B0061FD2A /* Security.framework in Frameworks */,
204223
);
205224
runOnlyForDeploymentPostprocessing = 0;
@@ -208,6 +227,7 @@
208227
isa = PBXFrameworksBuildPhase;
209228
buildActionMask = 2147483647;
210229
files = (
230+
74DA217C1F09457B009C19EE /* libz.tbd in Frameworks */,
211231
572EF2431B51F18A00EEBB58 /* SocketIO.framework in Frameworks */,
212232
);
213233
runOnlyForDeploymentPostprocessing = 0;
@@ -216,6 +236,7 @@
216236
isa = PBXFrameworksBuildPhase;
217237
buildActionMask = 2147483647;
218238
files = (
239+
74DA21761F094417009C19EE /* libz.tbd in Frameworks */,
219240
6CA08A9A1D615C140061FD2A /* Security.framework in Frameworks */,
220241
);
221242
runOnlyForDeploymentPostprocessing = 0;
@@ -234,6 +255,7 @@
234255
572EF20D1B51F12F00EEBB58 = {
235256
isa = PBXGroup;
236257
children = (
258+
74DA216B1F094371009C19EE /* zlib */,
237259
6CA08A9B1D615C190061FD2A /* Frameworks */,
238260
572EF21A1B51F16C00EEBB58 /* Products */,
239261
572EF21B1B51F16C00EEBB58 /* SocketIO-iOS */,
@@ -347,6 +369,10 @@
347369
6CA08A9B1D615C190061FD2A /* Frameworks */ = {
348370
isa = PBXGroup;
349371
children = (
372+
74DA217D1F0945E9009C19EE /* libcommonCrypto.tbd */,
373+
74DA21751F094417009C19EE /* libz.tbd */,
374+
74DA21731F09440F009C19EE /* libz.tbd */,
375+
74DA21711F094408009C19EE /* libz.tbd */,
350376
6CA08A9E1D615C340061FD2A /* tvOS */,
351377
6CA08A9D1D615C2C0061FD2A /* Mac */,
352378
6CA08A9C1D615C270061FD2A /* iOS */,
@@ -381,12 +407,22 @@
381407
74B4AD1B1D09A5C30062A523 /* Websocket */ = {
382408
isa = PBXGroup;
383409
children = (
410+
74DA21801F094887009C19EE /* Compression.swift */,
384411
749642B31D3FCE5500DD32D1 /* SSLSecurity.swift */,
385412
749642B41D3FCE5500DD32D1 /* WebSocket.swift */,
386413
);
387414
name = Websocket;
388415
sourceTree = "<group>";
389416
};
417+
74DA216B1F094371009C19EE /* zlib */ = {
418+
isa = PBXGroup;
419+
children = (
420+
74DA216C1F09438D009C19EE /* include.h */,
421+
74DA21771F09444E009C19EE /* module.modulemap */,
422+
);
423+
name = zlib;
424+
sourceTree = "<group>";
425+
};
390426
/* End PBXGroup section */
391427

392428
/* Begin PBXHeadersBuildPhase section */
@@ -395,6 +431,7 @@
395431
buildActionMask = 2147483647;
396432
files = (
397433
572EF21F1B51F16C00EEBB58 /* SocketIO.h in Headers */,
434+
74DA21701F0943F8009C19EE /* include.h in Headers */,
398435
);
399436
runOnlyForDeploymentPostprocessing = 0;
400437
};
@@ -403,6 +440,7 @@
403440
buildActionMask = 2147483647;
404441
files = (
405442
572EF23D1B51F18A00EEBB58 /* SocketIO-Mac.h in Headers */,
443+
74DA216F1F0943F4009C19EE /* include.h in Headers */,
406444
);
407445
runOnlyForDeploymentPostprocessing = 0;
408446
};
@@ -411,6 +449,7 @@
411449
buildActionMask = 2147483647;
412450
files = (
413451
57634A111BD9B46A00E19CD7 /* SocketIO.h in Headers */,
452+
74DA216E1F0943EE009C19EE /* include.h in Headers */,
414453
);
415454
runOnlyForDeploymentPostprocessing = 0;
416455
};
@@ -643,6 +682,7 @@
643682
749642B51D3FCE5500DD32D1 /* SSLSecurity.swift in Sources */,
644683
74171EB71C10CD240062D398 /* SocketParsable.swift in Sources */,
645684
74171E811C10CD240062D398 /* SocketEnginePacketType.swift in Sources */,
685+
74DA21811F094887009C19EE /* Compression.swift in Sources */,
646686
74171E6F1C10CD240062D398 /* SocketAnyEvent.swift in Sources */,
647687
747BC5991D5F943500CA5FA4 /* SocketIOClientConfiguration.swift in Sources */,
648688
74171E9F1C10CD240062D398 /* SocketIOClientOption.swift in Sources */,
@@ -685,6 +725,7 @@
685725
749642B61D3FCE5500DD32D1 /* SSLSecurity.swift in Sources */,
686726
74171EB91C10CD240062D398 /* SocketParsable.swift in Sources */,
687727
74171E831C10CD240062D398 /* SocketEnginePacketType.swift in Sources */,
728+
74DA21821F094887009C19EE /* Compression.swift in Sources */,
688729
74171E711C10CD240062D398 /* SocketAnyEvent.swift in Sources */,
689730
747BC59A1D5F943500CA5FA4 /* SocketIOClientConfiguration.swift in Sources */,
690731
74171EA11C10CD240062D398 /* SocketIOClientOption.swift in Sources */,
@@ -731,6 +772,7 @@
731772
749642B71D3FCE5500DD32D1 /* SSLSecurity.swift in Sources */,
732773
74171EBB1C10CD240062D398 /* SocketParsable.swift in Sources */,
733774
74171E851C10CD240062D398 /* SocketEnginePacketType.swift in Sources */,
775+
74DA21831F094887009C19EE /* Compression.swift in Sources */,
734776
74171E731C10CD240062D398 /* SocketAnyEvent.swift in Sources */,
735777
747BC59B1D5F943500CA5FA4 /* SocketIOClientConfiguration.swift in Sources */,
736778
74171EA31C10CD240062D398 /* SocketIOClientOption.swift in Sources */,
@@ -885,6 +927,7 @@
885927
PRODUCT_BUNDLE_IDENTIFIER = io.socket.SocketIOClientSwift;
886928
SDKROOT = iphoneos;
887929
SKIP_INSTALL = YES;
930+
SWIFT_INCLUDE_PATHS = $SRCROOT/zlib;
888931
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
889932
SWIFT_VERSION = 3.0;
890933
TARGETED_DEVICE_FAMILY = "1,2";
@@ -937,6 +980,7 @@
937980
PRODUCT_BUNDLE_IDENTIFIER = io.socket.SocketIOClientSwift;
938981
SDKROOT = iphoneos;
939982
SKIP_INSTALL = YES;
983+
SWIFT_INCLUDE_PATHS = $SRCROOT/zlib;
940984
SWIFT_VERSION = 3.0;
941985
TARGETED_DEVICE_FAMILY = "1,2";
942986
VALIDATE_PRODUCT = YES;
@@ -1088,11 +1132,16 @@
10881132
INFOPLIST_FILE = "SocketIO-Mac/Info.plist";
10891133
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
10901134
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
1135+
LIBRARY_SEARCH_PATHS = (
1136+
"$(inherited)",
1137+
"$(SDKROOT)/usr/lib/system",
1138+
);
10911139
MTL_ENABLE_DEBUG_INFO = YES;
10921140
ONLY_ACTIVE_ARCH = YES;
10931141
PRODUCT_BUNDLE_IDENTIFIER = "io.socket.$(PRODUCT_NAME:rfc1034identifier)";
10941142
SDKROOT = macosx;
10951143
SKIP_INSTALL = YES;
1144+
SWIFT_INCLUDE_PATHS = $SRCROOT/zlib;
10961145
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
10971146
SWIFT_VERSION = 3.0;
10981147
VERSIONING_SYSTEM = "apple-generic";
@@ -1142,10 +1191,15 @@
11421191
INFOPLIST_FILE = "SocketIO-Mac/Info.plist";
11431192
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
11441193
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
1194+
LIBRARY_SEARCH_PATHS = (
1195+
"$(inherited)",
1196+
"$(SDKROOT)/usr/lib/system",
1197+
);
11451198
MTL_ENABLE_DEBUG_INFO = NO;
11461199
PRODUCT_BUNDLE_IDENTIFIER = "io.socket.$(PRODUCT_NAME:rfc1034identifier)";
11471200
SDKROOT = macosx;
11481201
SKIP_INSTALL = YES;
1202+
SWIFT_INCLUDE_PATHS = $SRCROOT/zlib;
11491203
SWIFT_VERSION = 3.0;
11501204
VERSIONING_SYSTEM = "apple-generic";
11511205
VERSION_INFO_PREFIX = "";
@@ -1196,6 +1250,10 @@
11961250
GCC_WARN_UNUSED_VARIABLE = YES;
11971251
INFOPLIST_FILE = "SocketIO-MacTests/Info.plist";
11981252
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
1253+
LIBRARY_SEARCH_PATHS = (
1254+
"$(inherited)",
1255+
"$(SDKROOT)/usr/lib/system",
1256+
);
11991257
MACOSX_DEPLOYMENT_TARGET = 10.10;
12001258
MTL_ENABLE_DEBUG_INFO = YES;
12011259
ONLY_ACTIVE_ARCH = YES;
@@ -1245,6 +1303,10 @@
12451303
GCC_WARN_UNUSED_VARIABLE = YES;
12461304
INFOPLIST_FILE = "SocketIO-MacTests/Info.plist";
12471305
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
1306+
LIBRARY_SEARCH_PATHS = (
1307+
"$(inherited)",
1308+
"$(SDKROOT)/usr/lib/system",
1309+
);
12481310
MACOSX_DEPLOYMENT_TARGET = 10.10;
12491311
MTL_ENABLE_DEBUG_INFO = NO;
12501312
PRODUCT_BUNDLE_IDENTIFIER = "io.socket.$(PRODUCT_NAME:rfc1034identifier)";
@@ -1304,6 +1366,7 @@
13041366
PRODUCT_NAME = SocketIO;
13051367
SDKROOT = appletvos;
13061368
SKIP_INSTALL = YES;
1369+
SWIFT_INCLUDE_PATHS = $SRCROOT/zlib;
13071370
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
13081371
TARGETED_DEVICE_FAMILY = 3;
13091372
TVOS_DEPLOYMENT_TARGET = 9.0;
@@ -1356,6 +1419,7 @@
13561419
PRODUCT_NAME = SocketIO;
13571420
SDKROOT = appletvos;
13581421
SKIP_INSTALL = YES;
1422+
SWIFT_INCLUDE_PATHS = $SRCROOT/zlib;
13591423
TARGETED_DEVICE_FAMILY = 3;
13601424
TVOS_DEPLOYMENT_TARGET = 9.0;
13611425
VALIDATE_PRODUCT = YES;

0 commit comments

Comments
 (0)