From 7bd019fb283e3fd015bff85f451304f2eb3f365d Mon Sep 17 00:00:00 2001 From: Erik Little Date: Thu, 21 Jul 2016 11:15:07 -0400 Subject: [PATCH 01/15] travis plz --- Source/SocketIOClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SocketIOClient.swift b/Source/SocketIOClient.swift index ca7fe19..1210fa2 100644 --- a/Source/SocketIOClient.swift +++ b/Source/SocketIOClient.swift @@ -421,7 +421,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable } } - private func _tryReconnect() { + private func _tryReconnect() { if !reconnecting { return } From 1af7bd842ed91cd1a3551d0f4fe241d928fc90ce Mon Sep 17 00:00:00 2001 From: Erik Little Date: Thu, 21 Jul 2016 11:15:20 -0400 Subject: [PATCH 02/15] Revert "travis plz" This reverts commit 7bd019fb283e3fd015bff85f451304f2eb3f365d. --- Source/SocketIOClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SocketIOClient.swift b/Source/SocketIOClient.swift index 1210fa2..ca7fe19 100644 --- a/Source/SocketIOClient.swift +++ b/Source/SocketIOClient.swift @@ -421,7 +421,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable } } - private func _tryReconnect() { + private func _tryReconnect() { if !reconnecting { return } From 07f2ca5f16ff3ee2241df5f17218d5a6ade10d31 Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 14 Aug 2016 11:06:55 -0400 Subject: [PATCH 03/15] rename engine init --- Source/SocketEngine.swift | 6 +++--- Source/SocketIOClient.swift | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/SocketEngine.swift b/Source/SocketEngine.swift index b86f42a..9b3c5e1 100644 --- a/Source/SocketEngine.swift +++ b/Source/SocketEngine.swift @@ -80,11 +80,11 @@ public final class SocketEngine : NSObject, NSURLSessionDelegate, SocketEnginePo private var selfSigned = false private var voipEnabled = false - public init(client: SocketEngineClient, url: NSURL, options: SocketIOClientConfiguration) { + public init(client: SocketEngineClient, url: NSURL, config: SocketIOClientConfiguration) { self.client = client self.url = url - for option in options { + for option in config { switch option { case let .ConnectParams(params): connectParams = params @@ -127,7 +127,7 @@ public final class SocketEngine : NSObject, NSURLSessionDelegate, SocketEnginePo } public convenience init(client: SocketEngineClient, url: NSURL, options: NSDictionary?) { - self.init(client: client, url: url, options: options?.toSocketConfiguration() ?? []) + self.init(client: client, url: url, config: options?.toSocketConfiguration() ?? []) } deinit { diff --git a/Source/SocketIOClient.swift b/Source/SocketIOClient.swift index 7912615..3cc5fa4 100644 --- a/Source/SocketIOClient.swift +++ b/Source/SocketIOClient.swift @@ -118,7 +118,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable private func addEngine() -> SocketEngineSpec { DefaultSocketLogger.Logger.log("Adding engine", type: logType) - engine = SocketEngine(client: self, url: socketURL, options: config) + engine = SocketEngine(client: self, url: socketURL, config: config) return engine! } From 518c256cc2dc3bba7e32600acfaddc9da8292dcc Mon Sep 17 00:00:00 2001 From: Derek Clarkson Date: Mon, 15 Aug 2016 12:18:02 +1000 Subject: [PATCH 04/15] Renamed modules to make then consistent. Remove base sources from test compiles. --- .../project.pbxproj | 158 ++++++++---------- SocketIO-MacTests/SocketAckManagerTest.swift | 2 +- SocketIO-MacTests/SocketBasicPacketTest.swift | 2 +- SocketIO-MacTests/SocketEngineTest.swift | 2 +- .../SocketIOClientConfigurationTest.swift | 2 +- .../SocketNamespacePacketTest.swift | 2 +- SocketIO-MacTests/SocketObjectiveCTest.m | 2 +- SocketIO-MacTests/SocketParserTest.swift | 2 +- SocketIO-MacTests/SocketSideEffectTest.swift | 2 +- SocketIO-iOS/{SocketIO-iOS.h => SocketIO.h} | 0 10 files changed, 76 insertions(+), 98 deletions(-) rename SocketIO-iOS/{SocketIO-iOS.h => SocketIO.h} (100%) diff --git a/Socket.IO-Client-Swift.xcodeproj/project.pbxproj b/Socket.IO-Client-Swift.xcodeproj/project.pbxproj index 98a0f57..8ad9641 100644 --- a/Socket.IO-Client-Swift.xcodeproj/project.pbxproj +++ b/Socket.IO-Client-Swift.xcodeproj/project.pbxproj @@ -7,100 +7,70 @@ objects = { /* Begin PBXBuildFile section */ - 572EF21F1B51F16C00EEBB58 /* SocketIO-iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 572EF21E1B51F16C00EEBB58 /* SocketIO-iOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 572EF2251B51F16C00EEBB58 /* SocketIOClientSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 572EF2191B51F16C00EEBB58 /* SocketIOClientSwift.framework */; }; + 572EF21F1B51F16C00EEBB58 /* SocketIO.h in Headers */ = {isa = PBXBuildFile; fileRef = 572EF21E1B51F16C00EEBB58 /* SocketIO.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 572EF2251B51F16C00EEBB58 /* SocketIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 572EF2191B51F16C00EEBB58 /* SocketIO.framework */; }; 572EF23D1B51F18A00EEBB58 /* SocketIO-Mac.h in Headers */ = {isa = PBXBuildFile; fileRef = 572EF23C1B51F18A00EEBB58 /* SocketIO-Mac.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 572EF2431B51F18A00EEBB58 /* SocketIOClientSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 572EF2381B51F18A00EEBB58 /* SocketIOClientSwift.framework */; }; - 57634A111BD9B46A00E19CD7 /* SocketIO-iOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 572EF21E1B51F16C00EEBB58 /* SocketIO-iOS.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 572EF2431B51F18A00EEBB58 /* SocketIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 572EF2381B51F18A00EEBB58 /* SocketIO.framework */; }; + 57634A111BD9B46A00E19CD7 /* SocketIO.h in Headers */ = {isa = PBXBuildFile; fileRef = 572EF21E1B51F16C00EEBB58 /* SocketIO.h */; settings = {ATTRIBUTES = (Public, ); }; }; 57634A231BD9B46D00E19CD7 /* SocketSideEffectTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7472C65E1BCAC46E003CA70D /* SocketSideEffectTest.swift */; }; 57634A2A1BD9B46D00E19CD7 /* SocketEngineTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 741F39ED1BD025D80026C9CC /* SocketEngineTest.swift */; }; 57634A2F1BD9B46D00E19CD7 /* SocketBasicPacketTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F124EF1BC574CF002966F4 /* SocketBasicPacketTest.swift */; }; 57634A321BD9B46D00E19CD7 /* SocketNamespacePacketTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7472C65B1BCAB53E003CA70D /* SocketNamespacePacketTest.swift */; }; 57634A3F1BD9B4BF00E19CD7 /* SocketIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57634A161BD9B46A00E19CD7 /* SocketIO.framework */; }; + 6CA08A961D615C040061FD2A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6CA08A951D615C040061FD2A /* Security.framework */; }; + 6CA08A981D615C0B0061FD2A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6CA08A971D615C0B0061FD2A /* Security.framework */; }; + 6CA08A9A1D615C140061FD2A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6CA08A991D615C140061FD2A /* Security.framework */; }; 740CA1201C496EEB00CB98F4 /* SocketEngineWebsocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 740CA11F1C496EEB00CB98F4 /* SocketEngineWebsocket.swift */; }; 740CA1211C496EF200CB98F4 /* SocketEngineWebsocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 740CA11F1C496EEB00CB98F4 /* SocketEngineWebsocket.swift */; }; 740CA1221C496EF700CB98F4 /* SocketEngineWebsocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 740CA11F1C496EEB00CB98F4 /* SocketEngineWebsocket.swift */; }; 74171E631C10CD240062D398 /* SocketAckEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E501C10CD240062D398 /* SocketAckEmitter.swift */; }; - 74171E641C10CD240062D398 /* SocketAckEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E501C10CD240062D398 /* SocketAckEmitter.swift */; }; 74171E651C10CD240062D398 /* SocketAckEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E501C10CD240062D398 /* SocketAckEmitter.swift */; }; 74171E671C10CD240062D398 /* SocketAckEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E501C10CD240062D398 /* SocketAckEmitter.swift */; }; - 74171E681C10CD240062D398 /* SocketAckEmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E501C10CD240062D398 /* SocketAckEmitter.swift */; }; 74171E691C10CD240062D398 /* SocketAckManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E511C10CD240062D398 /* SocketAckManager.swift */; }; - 74171E6A1C10CD240062D398 /* SocketAckManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E511C10CD240062D398 /* SocketAckManager.swift */; }; 74171E6B1C10CD240062D398 /* SocketAckManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E511C10CD240062D398 /* SocketAckManager.swift */; }; 74171E6D1C10CD240062D398 /* SocketAckManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E511C10CD240062D398 /* SocketAckManager.swift */; }; - 74171E6E1C10CD240062D398 /* SocketAckManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E511C10CD240062D398 /* SocketAckManager.swift */; }; 74171E6F1C10CD240062D398 /* SocketAnyEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E521C10CD240062D398 /* SocketAnyEvent.swift */; }; - 74171E701C10CD240062D398 /* SocketAnyEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E521C10CD240062D398 /* SocketAnyEvent.swift */; }; 74171E711C10CD240062D398 /* SocketAnyEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E521C10CD240062D398 /* SocketAnyEvent.swift */; }; 74171E731C10CD240062D398 /* SocketAnyEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E521C10CD240062D398 /* SocketAnyEvent.swift */; }; - 74171E741C10CD240062D398 /* SocketAnyEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E521C10CD240062D398 /* SocketAnyEvent.swift */; }; 74171E751C10CD240062D398 /* SocketEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E531C10CD240062D398 /* SocketEngine.swift */; }; - 74171E761C10CD240062D398 /* SocketEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E531C10CD240062D398 /* SocketEngine.swift */; }; 74171E771C10CD240062D398 /* SocketEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E531C10CD240062D398 /* SocketEngine.swift */; }; 74171E791C10CD240062D398 /* SocketEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E531C10CD240062D398 /* SocketEngine.swift */; }; - 74171E7A1C10CD240062D398 /* SocketEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E531C10CD240062D398 /* SocketEngine.swift */; }; 74171E7B1C10CD240062D398 /* SocketEngineClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E541C10CD240062D398 /* SocketEngineClient.swift */; }; - 74171E7C1C10CD240062D398 /* SocketEngineClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E541C10CD240062D398 /* SocketEngineClient.swift */; }; 74171E7D1C10CD240062D398 /* SocketEngineClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E541C10CD240062D398 /* SocketEngineClient.swift */; }; 74171E7F1C10CD240062D398 /* SocketEngineClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E541C10CD240062D398 /* SocketEngineClient.swift */; }; - 74171E801C10CD240062D398 /* SocketEngineClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E541C10CD240062D398 /* SocketEngineClient.swift */; }; 74171E811C10CD240062D398 /* SocketEnginePacketType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E551C10CD240062D398 /* SocketEnginePacketType.swift */; }; - 74171E821C10CD240062D398 /* SocketEnginePacketType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E551C10CD240062D398 /* SocketEnginePacketType.swift */; }; 74171E831C10CD240062D398 /* SocketEnginePacketType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E551C10CD240062D398 /* SocketEnginePacketType.swift */; }; 74171E851C10CD240062D398 /* SocketEnginePacketType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E551C10CD240062D398 /* SocketEnginePacketType.swift */; }; - 74171E861C10CD240062D398 /* SocketEnginePacketType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E551C10CD240062D398 /* SocketEnginePacketType.swift */; }; 74171E871C10CD240062D398 /* SocketEngineSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E561C10CD240062D398 /* SocketEngineSpec.swift */; }; - 74171E881C10CD240062D398 /* SocketEngineSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E561C10CD240062D398 /* SocketEngineSpec.swift */; }; 74171E891C10CD240062D398 /* SocketEngineSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E561C10CD240062D398 /* SocketEngineSpec.swift */; }; 74171E8B1C10CD240062D398 /* SocketEngineSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E561C10CD240062D398 /* SocketEngineSpec.swift */; }; - 74171E8C1C10CD240062D398 /* SocketEngineSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E561C10CD240062D398 /* SocketEngineSpec.swift */; }; 74171E8D1C10CD240062D398 /* SocketEventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E571C10CD240062D398 /* SocketEventHandler.swift */; }; - 74171E8E1C10CD240062D398 /* SocketEventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E571C10CD240062D398 /* SocketEventHandler.swift */; }; 74171E8F1C10CD240062D398 /* SocketEventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E571C10CD240062D398 /* SocketEventHandler.swift */; }; 74171E911C10CD240062D398 /* SocketEventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E571C10CD240062D398 /* SocketEventHandler.swift */; }; - 74171E921C10CD240062D398 /* SocketEventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E571C10CD240062D398 /* SocketEventHandler.swift */; }; 74171E991C10CD240062D398 /* SocketIOClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E591C10CD240062D398 /* SocketIOClient.swift */; }; - 74171E9A1C10CD240062D398 /* SocketIOClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E591C10CD240062D398 /* SocketIOClient.swift */; }; 74171E9B1C10CD240062D398 /* SocketIOClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E591C10CD240062D398 /* SocketIOClient.swift */; }; 74171E9D1C10CD240062D398 /* SocketIOClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E591C10CD240062D398 /* SocketIOClient.swift */; }; - 74171E9E1C10CD240062D398 /* SocketIOClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E591C10CD240062D398 /* SocketIOClient.swift */; }; 74171E9F1C10CD240062D398 /* SocketIOClientOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5A1C10CD240062D398 /* SocketIOClientOption.swift */; }; - 74171EA01C10CD240062D398 /* SocketIOClientOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5A1C10CD240062D398 /* SocketIOClientOption.swift */; }; 74171EA11C10CD240062D398 /* SocketIOClientOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5A1C10CD240062D398 /* SocketIOClientOption.swift */; }; 74171EA31C10CD240062D398 /* SocketIOClientOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5A1C10CD240062D398 /* SocketIOClientOption.swift */; }; - 74171EA41C10CD240062D398 /* SocketIOClientOption.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5A1C10CD240062D398 /* SocketIOClientOption.swift */; }; 74171EA51C10CD240062D398 /* SocketIOClientStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5B1C10CD240062D398 /* SocketIOClientStatus.swift */; }; - 74171EA61C10CD240062D398 /* SocketIOClientStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5B1C10CD240062D398 /* SocketIOClientStatus.swift */; }; 74171EA71C10CD240062D398 /* SocketIOClientStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5B1C10CD240062D398 /* SocketIOClientStatus.swift */; }; - 74171EA81C10CD240062D398 /* SocketIOClientStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5B1C10CD240062D398 /* SocketIOClientStatus.swift */; }; 74171EA91C10CD240062D398 /* SocketIOClientStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5B1C10CD240062D398 /* SocketIOClientStatus.swift */; }; - 74171EAA1C10CD240062D398 /* SocketIOClientStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5B1C10CD240062D398 /* SocketIOClientStatus.swift */; }; 74171EAB1C10CD240062D398 /* SocketLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5C1C10CD240062D398 /* SocketLogger.swift */; }; - 74171EAC1C10CD240062D398 /* SocketLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5C1C10CD240062D398 /* SocketLogger.swift */; }; 74171EAD1C10CD240062D398 /* SocketLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5C1C10CD240062D398 /* SocketLogger.swift */; }; 74171EAF1C10CD240062D398 /* SocketLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5C1C10CD240062D398 /* SocketLogger.swift */; }; - 74171EB01C10CD240062D398 /* SocketLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5C1C10CD240062D398 /* SocketLogger.swift */; }; 74171EB11C10CD240062D398 /* SocketPacket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5D1C10CD240062D398 /* SocketPacket.swift */; }; - 74171EB21C10CD240062D398 /* SocketPacket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5D1C10CD240062D398 /* SocketPacket.swift */; }; 74171EB31C10CD240062D398 /* SocketPacket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5D1C10CD240062D398 /* SocketPacket.swift */; }; 74171EB51C10CD240062D398 /* SocketPacket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5D1C10CD240062D398 /* SocketPacket.swift */; }; - 74171EB61C10CD240062D398 /* SocketPacket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5D1C10CD240062D398 /* SocketPacket.swift */; }; 74171EB71C10CD240062D398 /* SocketParsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5E1C10CD240062D398 /* SocketParsable.swift */; }; - 74171EB81C10CD240062D398 /* SocketParsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5E1C10CD240062D398 /* SocketParsable.swift */; }; 74171EB91C10CD240062D398 /* SocketParsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5E1C10CD240062D398 /* SocketParsable.swift */; }; 74171EBB1C10CD240062D398 /* SocketParsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5E1C10CD240062D398 /* SocketParsable.swift */; }; - 74171EBC1C10CD240062D398 /* SocketParsable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5E1C10CD240062D398 /* SocketParsable.swift */; }; 74171EBD1C10CD240062D398 /* SocketStringReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5F1C10CD240062D398 /* SocketStringReader.swift */; }; - 74171EBE1C10CD240062D398 /* SocketStringReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5F1C10CD240062D398 /* SocketStringReader.swift */; }; 74171EBF1C10CD240062D398 /* SocketStringReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5F1C10CD240062D398 /* SocketStringReader.swift */; }; 74171EC11C10CD240062D398 /* SocketStringReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5F1C10CD240062D398 /* SocketStringReader.swift */; }; - 74171EC21C10CD240062D398 /* SocketStringReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E5F1C10CD240062D398 /* SocketStringReader.swift */; }; 74171EC31C10CD240062D398 /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E601C10CD240062D398 /* SocketTypes.swift */; }; - 74171EC41C10CD240062D398 /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E601C10CD240062D398 /* SocketTypes.swift */; }; 74171EC51C10CD240062D398 /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E601C10CD240062D398 /* SocketTypes.swift */; }; 74171EC71C10CD240062D398 /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E601C10CD240062D398 /* SocketTypes.swift */; }; - 74171EC81C10CD240062D398 /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74171E601C10CD240062D398 /* SocketTypes.swift */; }; 741F39EE1BD025D80026C9CC /* SocketEngineTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 741F39ED1BD025D80026C9CC /* SocketEngineTest.swift */; }; 741F39EF1BD025D80026C9CC /* SocketEngineTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 741F39ED1BD025D80026C9CC /* SocketEngineTest.swift */; }; 7420CB791C49629E00956AA4 /* SocketEnginePollable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7420CB781C49629E00956AA4 /* SocketEnginePollable.swift */; }; @@ -161,17 +131,20 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 572EF2191B51F16C00EEBB58 /* SocketIOClientSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SocketIOClientSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 572EF2191B51F16C00EEBB58 /* SocketIO.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SocketIO.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 572EF21D1B51F16C00EEBB58 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 572EF21E1B51F16C00EEBB58 /* SocketIO-iOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SocketIO-iOS.h"; sourceTree = ""; }; + 572EF21E1B51F16C00EEBB58 /* SocketIO.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SocketIO.h; sourceTree = ""; }; 572EF2241B51F16C00EEBB58 /* SocketIO-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SocketIO-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 572EF2381B51F18A00EEBB58 /* SocketIOClientSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SocketIOClientSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 572EF2381B51F18A00EEBB58 /* SocketIO.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SocketIO.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 572EF23B1B51F18A00EEBB58 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 572EF23C1B51F18A00EEBB58 /* SocketIO-Mac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SocketIO-Mac.h"; sourceTree = ""; }; 572EF2421B51F18A00EEBB58 /* SocketIO-MacTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SocketIO-MacTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 572EF2481B51F18A00EEBB58 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57634A161BD9B46A00E19CD7 /* SocketIO.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SocketIO.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 57634A3B1BD9B46D00E19CD7 /* SocketIO-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SocketIO-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6CA08A951D615C040061FD2A /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; + 6CA08A971D615C0B0061FD2A /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; + 6CA08A991D615C140061FD2A /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.2.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; 740CA11F1C496EEB00CB98F4 /* SocketEngineWebsocket.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SocketEngineWebsocket.swift; path = Source/SocketEngineWebsocket.swift; sourceTree = ""; }; 74171E501C10CD240062D398 /* SocketAckEmitter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SocketAckEmitter.swift; path = Source/SocketAckEmitter.swift; sourceTree = ""; }; 74171E511C10CD240062D398 /* SocketAckManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SocketAckManager.swift; path = Source/SocketAckManager.swift; sourceTree = ""; }; @@ -211,6 +184,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6CA08A961D615C040061FD2A /* Security.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -218,7 +192,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 572EF2251B51F16C00EEBB58 /* SocketIOClientSwift.framework in Frameworks */, + 572EF2251B51F16C00EEBB58 /* SocketIO.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -226,6 +200,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6CA08A981D615C0B0061FD2A /* Security.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -233,7 +208,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 572EF2431B51F18A00EEBB58 /* SocketIOClientSwift.framework in Frameworks */, + 572EF2431B51F18A00EEBB58 /* SocketIO.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -241,6 +216,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6CA08A9A1D615C140061FD2A /* Security.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -258,20 +234,21 @@ 572EF20D1B51F12F00EEBB58 = { isa = PBXGroup; children = ( - 5764DF7B1B51F24A004FF46E /* Source */, + 6CA08A9B1D615C190061FD2A /* Frameworks */, + 572EF21A1B51F16C00EEBB58 /* Products */, 572EF21B1B51F16C00EEBB58 /* SocketIO-iOS */, 572EF2391B51F18A00EEBB58 /* SocketIO-Mac */, 572EF2461B51F18A00EEBB58 /* SocketIO-MacTests */, - 572EF21A1B51F16C00EEBB58 /* Products */, + 5764DF7B1B51F24A004FF46E /* Source */, ); sourceTree = ""; }; 572EF21A1B51F16C00EEBB58 /* Products */ = { isa = PBXGroup; children = ( - 572EF2191B51F16C00EEBB58 /* SocketIOClientSwift.framework */, + 572EF2191B51F16C00EEBB58 /* SocketIO.framework */, 572EF2241B51F16C00EEBB58 /* SocketIO-iOSTests.xctest */, - 572EF2381B51F18A00EEBB58 /* SocketIOClientSwift.framework */, + 572EF2381B51F18A00EEBB58 /* SocketIO.framework */, 572EF2421B51F18A00EEBB58 /* SocketIO-MacTests.xctest */, 57634A161BD9B46A00E19CD7 /* SocketIO.framework */, 57634A3B1BD9B46D00E19CD7 /* SocketIO-tvOSTests.xctest */, @@ -282,7 +259,7 @@ 572EF21B1B51F16C00EEBB58 /* SocketIO-iOS */ = { isa = PBXGroup; children = ( - 572EF21E1B51F16C00EEBB58 /* SocketIO-iOS.h */, + 572EF21E1B51F16C00EEBB58 /* SocketIO.h */, 572EF21C1B51F16C00EEBB58 /* Supporting Files */, ); path = "SocketIO-iOS"; @@ -367,6 +344,40 @@ name = Source; sourceTree = ""; }; + 6CA08A9B1D615C190061FD2A /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6CA08A9E1D615C340061FD2A /* tvOS */, + 6CA08A9D1D615C2C0061FD2A /* Mac */, + 6CA08A9C1D615C270061FD2A /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6CA08A9C1D615C270061FD2A /* iOS */ = { + isa = PBXGroup; + children = ( + 6CA08A951D615C040061FD2A /* Security.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 6CA08A9D1D615C2C0061FD2A /* Mac */ = { + isa = PBXGroup; + children = ( + 6CA08A971D615C0B0061FD2A /* Security.framework */, + ); + name = Mac; + sourceTree = ""; + }; + 6CA08A9E1D615C340061FD2A /* tvOS */ = { + isa = PBXGroup; + children = ( + 6CA08A991D615C140061FD2A /* Security.framework */, + ); + name = tvOS; + sourceTree = ""; + }; 74B4AD1B1D09A5C30062A523 /* Websocket */ = { isa = PBXGroup; children = ( @@ -383,7 +394,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 572EF21F1B51F16C00EEBB58 /* SocketIO-iOS.h in Headers */, + 572EF21F1B51F16C00EEBB58 /* SocketIO.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -399,7 +410,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 57634A111BD9B46A00E19CD7 /* SocketIO-iOS.h in Headers */, + 57634A111BD9B46A00E19CD7 /* SocketIO.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -421,7 +432,7 @@ ); name = "SocketIO-iOS"; productName = "SocketIO-iOS"; - productReference = 572EF2191B51F16C00EEBB58 /* SocketIOClientSwift.framework */; + productReference = 572EF2191B51F16C00EEBB58 /* SocketIO.framework */; productType = "com.apple.product-type.framework"; }; 572EF2231B51F16C00EEBB58 /* SocketIO-iOSTests */ = { @@ -457,7 +468,7 @@ ); name = "SocketIO-Mac"; productName = "SocketIO-Mac"; - productReference = 572EF2381B51F18A00EEBB58 /* SocketIOClientSwift.framework */; + productReference = 572EF2381B51F18A00EEBB58 /* SocketIO.framework */; productType = "com.apple.product-type.framework"; }; 572EF2411B51F18A00EEBB58 /* SocketIO-MacTests */ = { @@ -641,25 +652,9 @@ buildActionMask = 2147483647; files = ( 7472C65F1BCAC46E003CA70D /* SocketSideEffectTest.swift in Sources */, - 74171EA61C10CD240062D398 /* SocketIOClientStatus.swift in Sources */, - 74171E881C10CD240062D398 /* SocketEngineSpec.swift in Sources */, - 74171EA01C10CD240062D398 /* SocketIOClientOption.swift in Sources */, - 74171E701C10CD240062D398 /* SocketAnyEvent.swift in Sources */, - 74171EC41C10CD240062D398 /* SocketTypes.swift in Sources */, - 74171E8E1C10CD240062D398 /* SocketEventHandler.swift in Sources */, - 74171E7C1C10CD240062D398 /* SocketEngineClient.swift in Sources */, - 74171E821C10CD240062D398 /* SocketEnginePacketType.swift in Sources */, - 74171EB21C10CD240062D398 /* SocketPacket.swift in Sources */, 741F39EE1BD025D80026C9CC /* SocketEngineTest.swift in Sources */, - 74171EBE1C10CD240062D398 /* SocketStringReader.swift in Sources */, 74F124F01BC574CF002966F4 /* SocketBasicPacketTest.swift in Sources */, - 74171E6A1C10CD240062D398 /* SocketAckManager.swift in Sources */, - 74171E761C10CD240062D398 /* SocketEngine.swift in Sources */, - 74171E641C10CD240062D398 /* SocketAckEmitter.swift in Sources */, - 74171EB81C10CD240062D398 /* SocketParsable.swift in Sources */, - 74171EAC1C10CD240062D398 /* SocketLogger.swift in Sources */, 7472C65C1BCAB53E003CA70D /* SocketNamespacePacketTest.swift in Sources */, - 74171E9A1C10CD240062D398 /* SocketIOClient.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -703,7 +698,6 @@ 74321DCC1C2D939A00CF6F43 /* SocketParserTest.swift in Sources */, 747BC59F1D5F9BA200CA5FA4 /* SocketIOClientConfigurationTest.swift in Sources */, 7472C6601BCAC46E003CA70D /* SocketSideEffectTest.swift in Sources */, - 74171EA81C10CD240062D398 /* SocketIOClientStatus.swift in Sources */, 741F39EF1BD025D80026C9CC /* SocketEngineTest.swift in Sources */, 74F124F11BC574CF002966F4 /* SocketBasicPacketTest.swift in Sources */, 7472C65D1BCAB53E003CA70D /* SocketNamespacePacketTest.swift in Sources */, @@ -746,25 +740,9 @@ buildActionMask = 2147483647; files = ( 57634A231BD9B46D00E19CD7 /* SocketSideEffectTest.swift in Sources */, - 74171EAA1C10CD240062D398 /* SocketIOClientStatus.swift in Sources */, - 74171E8C1C10CD240062D398 /* SocketEngineSpec.swift in Sources */, - 74171EA41C10CD240062D398 /* SocketIOClientOption.swift in Sources */, - 74171E741C10CD240062D398 /* SocketAnyEvent.swift in Sources */, - 74171EC81C10CD240062D398 /* SocketTypes.swift in Sources */, - 74171E921C10CD240062D398 /* SocketEventHandler.swift in Sources */, - 74171E801C10CD240062D398 /* SocketEngineClient.swift in Sources */, - 74171E861C10CD240062D398 /* SocketEnginePacketType.swift in Sources */, - 74171EB61C10CD240062D398 /* SocketPacket.swift in Sources */, 57634A2A1BD9B46D00E19CD7 /* SocketEngineTest.swift in Sources */, - 74171EC21C10CD240062D398 /* SocketStringReader.swift in Sources */, 57634A2F1BD9B46D00E19CD7 /* SocketBasicPacketTest.swift in Sources */, - 74171E6E1C10CD240062D398 /* SocketAckManager.swift in Sources */, - 74171E7A1C10CD240062D398 /* SocketEngine.swift in Sources */, - 74171E681C10CD240062D398 /* SocketAckEmitter.swift in Sources */, - 74171EBC1C10CD240062D398 /* SocketParsable.swift in Sources */, - 74171EB01C10CD240062D398 /* SocketLogger.swift in Sources */, 57634A321BD9B46D00E19CD7 /* SocketNamespacePacketTest.swift in Sources */, - 74171E9E1C10CD240062D398 /* SocketIOClient.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -800,7 +778,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.10; ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = SocketIOClientSwift; + PRODUCT_NAME = SocketIO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TVOS_DEPLOYMENT_TARGET = 9.0; WATCHOS_DEPLOYMENT_TARGET = 2.0; @@ -815,7 +793,7 @@ ENABLE_BITCODE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.10; - PRODUCT_NAME = SocketIOClientSwift; + PRODUCT_NAME = SocketIO; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TVOS_DEPLOYMENT_TARGET = 9.0; WATCHOS_DEPLOYMENT_TARGET = 2.0; @@ -970,7 +948,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "SocketIO-iOSTests/Info.plist"; + INFOPLIST_FILE = "SocketIO-iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; @@ -1015,7 +993,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "SocketIO-iOSTests/Info.plist"; + INFOPLIST_FILE = "SocketIO-iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; @@ -1385,7 +1363,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "SocketIO-iOSTests/Info.plist"; + INFOPLIST_FILE = "SocketIO-iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = YES; @@ -1430,7 +1408,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "SocketIO-iOSTests/Info.plist"; + INFOPLIST_FILE = "SocketIO-iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MTL_ENABLE_DEBUG_INFO = NO; diff --git a/SocketIO-MacTests/SocketAckManagerTest.swift b/SocketIO-MacTests/SocketAckManagerTest.swift index 91a2f25..70e7890 100644 --- a/SocketIO-MacTests/SocketAckManagerTest.swift +++ b/SocketIO-MacTests/SocketAckManagerTest.swift @@ -7,7 +7,7 @@ // import XCTest -@testable import SocketIOClientSwift +@testable import SocketIO class SocketAckManagerTest: XCTestCase { var ackManager = SocketAckManager() diff --git a/SocketIO-MacTests/SocketBasicPacketTest.swift b/SocketIO-MacTests/SocketBasicPacketTest.swift index 1161fe3..f8b13eb 100644 --- a/SocketIO-MacTests/SocketBasicPacketTest.swift +++ b/SocketIO-MacTests/SocketBasicPacketTest.swift @@ -7,7 +7,7 @@ // import XCTest -@testable import SocketIOClientSwift +@testable import SocketIO class SocketBasicPacketTest: XCTestCase { let data = "test".dataUsingEncoding(NSUTF8StringEncoding)! diff --git a/SocketIO-MacTests/SocketEngineTest.swift b/SocketIO-MacTests/SocketEngineTest.swift index ec543a1..0e2678c 100644 --- a/SocketIO-MacTests/SocketEngineTest.swift +++ b/SocketIO-MacTests/SocketEngineTest.swift @@ -7,7 +7,7 @@ // import XCTest -@testable import SocketIOClientSwift +@testable import SocketIO class SocketEngineTest: XCTestCase { var client: SocketIOClient! diff --git a/SocketIO-MacTests/SocketIOClientConfigurationTest.swift b/SocketIO-MacTests/SocketIOClientConfigurationTest.swift index ee5dbdf..dc2b720 100644 --- a/SocketIO-MacTests/SocketIOClientConfigurationTest.swift +++ b/SocketIO-MacTests/SocketIOClientConfigurationTest.swift @@ -7,7 +7,7 @@ // import XCTest -import SocketIOClientSwift +import SocketIO class TestSocketIOClientConfiguration: XCTestCase { var config = [] as SocketIOClientConfiguration diff --git a/SocketIO-MacTests/SocketNamespacePacketTest.swift b/SocketIO-MacTests/SocketNamespacePacketTest.swift index 4a235ba..431a62b 100644 --- a/SocketIO-MacTests/SocketNamespacePacketTest.swift +++ b/SocketIO-MacTests/SocketNamespacePacketTest.swift @@ -7,7 +7,7 @@ // import XCTest -@testable import SocketIOClientSwift +@testable import SocketIO class SocketNamespacePacketTest: XCTestCase { let data = "test".dataUsingEncoding(NSUTF8StringEncoding)! diff --git a/SocketIO-MacTests/SocketObjectiveCTest.m b/SocketIO-MacTests/SocketObjectiveCTest.m index cafeff0..1de8192 100644 --- a/SocketIO-MacTests/SocketObjectiveCTest.m +++ b/SocketIO-MacTests/SocketObjectiveCTest.m @@ -8,7 +8,7 @@ // #import -@import SocketIOClientSwift; +@import SocketIO; @interface SocketObjectiveCTest : XCTestCase diff --git a/SocketIO-MacTests/SocketParserTest.swift b/SocketIO-MacTests/SocketParserTest.swift index 7307cc0..a43fdaf 100644 --- a/SocketIO-MacTests/SocketParserTest.swift +++ b/SocketIO-MacTests/SocketParserTest.swift @@ -7,7 +7,7 @@ // import XCTest -@testable import SocketIOClientSwift +@testable import SocketIO class SocketParserTest: XCTestCase { let testSocket = SocketIOClient(socketURL: NSURL()) diff --git a/SocketIO-MacTests/SocketSideEffectTest.swift b/SocketIO-MacTests/SocketSideEffectTest.swift index bae130b..a190680 100644 --- a/SocketIO-MacTests/SocketSideEffectTest.swift +++ b/SocketIO-MacTests/SocketSideEffectTest.swift @@ -7,7 +7,7 @@ // import XCTest -@testable import SocketIOClientSwift +@testable import SocketIO class SocketSideEffectTest: XCTestCase { let data = "test".dataUsingEncoding(NSUTF8StringEncoding)! diff --git a/SocketIO-iOS/SocketIO-iOS.h b/SocketIO-iOS/SocketIO.h similarity index 100% rename from SocketIO-iOS/SocketIO-iOS.h rename to SocketIO-iOS/SocketIO.h From 5e1dc533042fc55630bbfca569971bb3ca7ee4bc Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 14 Aug 2016 23:05:02 -0400 Subject: [PATCH 05/15] update readme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f08ab7a..010ad0a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Socket.IO-client for iOS/OS X. ##Example ```swift +import SocketIO + let socket = SocketIOClient(socketURL: NSURL(string: "http://localhost:8080")!, config: [.Log(true), .ForcePolling(true)]) socket.on("connect") {data, ack in @@ -26,6 +28,7 @@ socket.connect() ##Objective-C Example ```objective-c +@import SocketIO; NSURL* url = [[NSURL alloc] initWithString:@"http://localhost:8080"]; SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{@"log": @YES, @"forcePolling": @YES}]; @@ -115,13 +118,13 @@ Import the module: Swift: ```swift -import SocketIOClientSwift +import SocketIO ``` Objective-C: ```Objective-C -@import SocketIOClientSwift; +@import SocketIO; ``` CocoaSeeds From 4a9013d9866e96b56c8ce9432a378182a7d9a8fd Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 27 Aug 2016 11:10:56 -0400 Subject: [PATCH 06/15] bump version --- README.md | 6 +++--- Socket.IO-Client-Swift.podspec | 4 ++-- .../xcshareddata/xcschemes/SocketIO-Mac.xcscheme | 8 ++++---- .../xcshareddata/xcschemes/SocketIO-iOS.xcscheme | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 010ad0a..5e446bd 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Carthage ----------------- Add this line to your `Cartfile`: ``` -github "socketio/socket.io-client-swift" ~> 6.1.6 # Or latest version +github "socketio/socket.io-client-swift" ~> 7.0.0 # Or latest version ``` Run `carthage update --platform ios,macosx`. @@ -104,7 +104,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`: use_frameworks! target 'YourApp' do - pod 'Socket.IO-Client-Swift', '~> 6.1.6' # Or latest version + pod 'Socket.IO-Client-Swift', '~> 7.0.0' # Or latest version end ``` @@ -133,7 +133,7 @@ CocoaSeeds Add this line to your `Seedfile`: ``` -github "socketio/socket.io-client-swift", "v6.1.6", :files => "Source/*.swift" # Or latest version +github "socketio/socket.io-client-swift", "v7.0.0", :files => "Source/*.swift" # Or latest version ``` Run `seed install`. diff --git a/Socket.IO-Client-Swift.podspec b/Socket.IO-Client-Swift.podspec index ae9890b..98631c1 100644 --- a/Socket.IO-Client-Swift.podspec +++ b/Socket.IO-Client-Swift.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Socket.IO-Client-Swift" s.module_name = "SocketIOClientSwift" - s.version = "6.1.6" + s.version = "7.0.0" s.summary = "Socket.IO-client for iOS and OS X" s.description = <<-DESC Socket.IO-client for iOS and OS X. @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '9.0' - s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v6.1.6' } + s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v7.0.0' } s.source_files = "Source/**/*.swift" s.requires_arc = true # s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files diff --git a/Socket.IO-Client-Swift.xcodeproj/xcshareddata/xcschemes/SocketIO-Mac.xcscheme b/Socket.IO-Client-Swift.xcodeproj/xcshareddata/xcschemes/SocketIO-Mac.xcscheme index 64047b1..7fef4ce 100644 --- a/Socket.IO-Client-Swift.xcodeproj/xcshareddata/xcschemes/SocketIO-Mac.xcscheme +++ b/Socket.IO-Client-Swift.xcodeproj/xcshareddata/xcschemes/SocketIO-Mac.xcscheme @@ -15,7 +15,7 @@ @@ -57,7 +57,7 @@ @@ -79,7 +79,7 @@ @@ -97,7 +97,7 @@ diff --git a/Socket.IO-Client-Swift.xcodeproj/xcshareddata/xcschemes/SocketIO-iOS.xcscheme b/Socket.IO-Client-Swift.xcodeproj/xcshareddata/xcschemes/SocketIO-iOS.xcscheme index e57f397..fc2fa75 100644 --- a/Socket.IO-Client-Swift.xcodeproj/xcshareddata/xcschemes/SocketIO-iOS.xcscheme +++ b/Socket.IO-Client-Swift.xcodeproj/xcshareddata/xcschemes/SocketIO-iOS.xcscheme @@ -15,7 +15,7 @@ @@ -58,7 +58,7 @@ @@ -80,7 +80,7 @@ @@ -98,7 +98,7 @@ From e3c8cc7fd96eb2e2aa6eea3a7cb627f0741094c8 Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 27 Aug 2016 11:15:27 -0400 Subject: [PATCH 07/15] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e446bd..cf6f523 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ Run `seed install`. ##API Constructors ----------- -`init(var socketURL: NSURL, config: SocketIOClientConfiguration = [])` - Creates a new SocketIOClient. options is a Set of SocketIOClientOption. If your socket.io server is secure, you need to specify `https` in your socketURL. +`init(var socketURL: NSURL, config: SocketIOClientConfiguration = [])` - Creates a new SocketIOClient. If your socket.io server is secure, you need to specify `https` in your socketURL. `convenience init(socketURL: NSURL, options: NSDictionary?)` - Same as above, but meant for Objective-C. See Options on how convert between SocketIOClientOptions and dictionary keys. From 4de7a48e8768a1a0ed9351e1bb8429f925d23068 Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 27 Aug 2016 11:37:13 -0400 Subject: [PATCH 08/15] Don't send whole packet to handleConnect --- Source/SocketParsable.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/SocketParsable.swift b/Source/SocketParsable.swift index d5a1b9d..b12ba30 100644 --- a/Source/SocketParsable.swift +++ b/Source/SocketParsable.swift @@ -32,8 +32,8 @@ extension SocketParsable { return nsp == self.nsp } - private func handleConnect(p: SocketPacket) { - if p.nsp == "/" && nsp != "/" { + private func handleConnect(packetNamespace: String) { + if packetNamespace == "/" && nsp != "/" { joinNamespace(nsp) } else { didConnect() @@ -51,7 +51,7 @@ extension SocketParsable { case .BinaryAck where isCorrectNamespace(pack.nsp): waitingPackets.append(pack) case .Connect: - handleConnect(pack) + handleConnect(pack.nsp) case .Disconnect: didDisconnect("Got Disconnect") case .Error: From bd7f94333d0e5f26387c72122fa9d7485c9ba4ef Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 27 Aug 2016 13:05:22 -0400 Subject: [PATCH 09/15] Refactor engine. Fix infinite recursion in configuration --- Source/SocketEngine.swift | 60 ++++++++++++------------ Source/SocketIOClientConfiguration.swift | 2 +- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/Source/SocketEngine.swift b/Source/SocketEngine.swift index 9b3c5e1..cdc94ab 100644 --- a/Source/SocketEngine.swift +++ b/Source/SocketEngine.swift @@ -359,36 +359,38 @@ public final class SocketEngine : NSObject, NSURLSessionDelegate, SocketEnginePo private func handleOpen(openData: String) { do { let json = try openData.toNSDictionary() - - if let sid = json["sid"] as? String { - let upgradeWs: Bool - - self.sid = sid - connected = true - - if let upgrades = json["upgrades"] as? [String] { - upgradeWs = upgrades.contains("websocket") - } else { - upgradeWs = false - } - - if let pingInterval = json["pingInterval"] as? Double, pingTimeout = json["pingTimeout"] as? Double { - self.pingInterval = pingInterval / 1000.0 - self.pingTimeout = pingTimeout / 1000.0 - } - - if !forcePolling && !forceWebsockets && upgradeWs { - createWebsocketAndConnect() - } - - sendPing() - - if !forceWebsockets { - doPoll() - } - - client?.engineDidOpen("Connect") + guard let sid = json[sid] as? String else { + client?.engineDidError("Open packet contained no sid") + return } + + let upgradeWs: Bool + + self.sid = sid + connected = true + + if let upgrades = json["upgrades"] as? [String] { + upgradeWs = upgrades.contains("websocket") + } else { + upgradeWs = false + } + + if let pingInterval = json["pingInterval"] as? Double, pingTimeout = json["pingTimeout"] as? Double { + self.pingInterval = pingInterval / 1000.0 + self.pingTimeout = pingTimeout / 1000.0 + } + + if !forcePolling && !forceWebsockets && upgradeWs { + createWebsocketAndConnect() + } + + sendPing() + + if !forceWebsockets { + doPoll() + } + + client?.engineDidOpen("Connect") } catch { didError("Error parsing open packet") } diff --git a/Source/SocketIOClientConfiguration.swift b/Source/SocketIOClientConfiguration.swift index c743991..4823430 100644 --- a/Source/SocketIOClientConfiguration.swift +++ b/Source/SocketIOClientConfiguration.swift @@ -97,7 +97,7 @@ public struct SocketIOClientConfiguration : ArrayLiteralConvertible, CollectionT @warn_unused_result public func prefixThrough(position: Index) -> SubSequence { - return prefixThrough(position) + return backingArray.prefixThrough(position) } @warn_unused_result From c7c824c3c53287c669b3c8fb3890f4c902a1e09e Mon Sep 17 00:00:00 2001 From: Erik Date: Sat, 27 Aug 2016 13:08:09 -0400 Subject: [PATCH 10/15] bump version --- README.md | 6 +++--- Socket.IO-Client-Swift.podspec | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cf6f523..f73a9ea 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Carthage ----------------- Add this line to your `Cartfile`: ``` -github "socketio/socket.io-client-swift" ~> 7.0.0 # Or latest version +github "socketio/socket.io-client-swift" ~> 7.0.1 # Or latest version ``` Run `carthage update --platform ios,macosx`. @@ -104,7 +104,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`: use_frameworks! target 'YourApp' do - pod 'Socket.IO-Client-Swift', '~> 7.0.0' # Or latest version + pod 'Socket.IO-Client-Swift', '~> 7.0.1' # Or latest version end ``` @@ -133,7 +133,7 @@ CocoaSeeds Add this line to your `Seedfile`: ``` -github "socketio/socket.io-client-swift", "v7.0.0", :files => "Source/*.swift" # Or latest version +github "socketio/socket.io-client-swift", "v7.0.1", :files => "Source/*.swift" # Or latest version ``` Run `seed install`. diff --git a/Socket.IO-Client-Swift.podspec b/Socket.IO-Client-Swift.podspec index 98631c1..de04093 100644 --- a/Socket.IO-Client-Swift.podspec +++ b/Socket.IO-Client-Swift.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Socket.IO-Client-Swift" s.module_name = "SocketIOClientSwift" - s.version = "7.0.0" + s.version = "7.0.1" s.summary = "Socket.IO-client for iOS and OS X" s.description = <<-DESC Socket.IO-client for iOS and OS X. @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '9.0' - s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v7.0.0' } + s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v7.0.1' } s.source_files = "Source/**/*.swift" s.requires_arc = true # s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files From 2200972f4dbfaa620ad5b8e11be2c2ba2669a878 Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 28 Aug 2016 08:29:00 -0400 Subject: [PATCH 11/15] Fix socketio/socket.io-client-swift#472 --- Source/SocketIOClient.swift | 43 ++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/Source/SocketIOClient.swift b/Source/SocketIOClient.swift index 3cc5fa4..98a825b 100644 --- a/Source/SocketIOClient.swift +++ b/Source/SocketIOClient.swift @@ -67,7 +67,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable return nsp + "#" + (engine?.sid ?? "") } - /// Type safe way to create a new SocketIOClient. opts can be omitted + /// Type safe way to create a new SocketIOClient. config can be omitted public init(socketURL: NSURL, config: SocketIOClientConfiguration = []) { self.config = config self.socketURL = socketURL @@ -150,12 +150,12 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable let time = dispatch_time(DISPATCH_TIME_NOW, Int64(timeoutAfter) * Int64(NSEC_PER_SEC)) dispatch_after(time, handleQueue) {[weak self] in - if let this = self where this.status != .Connected && this.status != .Disconnected { - this.status = .Disconnected - this.engine?.disconnect("Connect timeout") - - handler?() - } + guard let this = self where this.status != .Connected && this.status != .Disconnected else { return } + + this.status = .Disconnected + this.engine?.disconnect("Connect timeout") + + handler?() } } @@ -163,20 +163,20 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable currentAck += 1 return {[weak self, ack = currentAck] timeout, callback in - if let this = self { - dispatch_sync(this.ackQueue) { - this.ackHandlers.addAck(ack, callback: callback) - } - + guard let this = self else { return } + + dispatch_sync(this.ackQueue) { + this.ackHandlers.addAck(ack, callback: callback) + } + + + this._emit(items, ack: ack) + + if timeout != 0 { + let time = dispatch_time(DISPATCH_TIME_NOW, Int64(timeout * NSEC_PER_SEC)) - this._emit(items, ack: ack) - - if timeout != 0 { - let time = dispatch_time(DISPATCH_TIME_NOW, Int64(timeout * NSEC_PER_SEC)) - - dispatch_after(time, this.ackQueue) { - this.ackHandlers.timeoutAck(ack, onQueue: this.handleQueue) - } + dispatch_after(time, this.ackQueue) { + this.ackHandlers.timeoutAck(ack, onQueue: this.handleQueue) } } } @@ -196,6 +196,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable DefaultSocketLogger.Logger.log("Disconnected: %@", type: logType, args: reason) + reconnecting = false status = .Disconnected // Make sure the engine is actually dead. @@ -205,8 +206,6 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable /// Disconnects the socket. public func disconnect() { - assert(status != .NotConnected, "Tried closing a NotConnected client") - DefaultSocketLogger.Logger.log("Closing socket", type: logType) didDisconnect("Disconnect") From cf12865aa034dd5529b5cb516a18cad874670e1b Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 29 Aug 2016 05:10:03 -0400 Subject: [PATCH 12/15] fix sid bug --- Socket.IO-Client-Swift.podspec | 4 ++-- Source/SocketEngine.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Socket.IO-Client-Swift.podspec b/Socket.IO-Client-Swift.podspec index de04093..1ccaf4b 100644 --- a/Socket.IO-Client-Swift.podspec +++ b/Socket.IO-Client-Swift.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Socket.IO-Client-Swift" s.module_name = "SocketIOClientSwift" - s.version = "7.0.1" + s.version = "7.0.2" s.summary = "Socket.IO-client for iOS and OS X" s.description = <<-DESC Socket.IO-client for iOS and OS X. @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '9.0' - s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v7.0.1' } + s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v7.0.2' } s.source_files = "Source/**/*.swift" s.requires_arc = true # s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files diff --git a/Source/SocketEngine.swift b/Source/SocketEngine.swift index cdc94ab..753f750 100644 --- a/Source/SocketEngine.swift +++ b/Source/SocketEngine.swift @@ -359,7 +359,7 @@ public final class SocketEngine : NSObject, NSURLSessionDelegate, SocketEnginePo private func handleOpen(openData: String) { do { let json = try openData.toNSDictionary() - guard let sid = json[sid] as? String else { + guard let sid = json["sid"] as? String else { client?.engineDidError("Open packet contained no sid") return } From 7d07e55ce595cee970f80eace147cab95f157e03 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 29 Aug 2016 05:21:45 -0400 Subject: [PATCH 13/15] Fix cocoapods name --- README.md | 6 +++--- Socket.IO-Client-Swift.podspec | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f73a9ea..c58abb4 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Carthage ----------------- Add this line to your `Cartfile`: ``` -github "socketio/socket.io-client-swift" ~> 7.0.1 # Or latest version +github "socketio/socket.io-client-swift" ~> 7.0.3 # Or latest version ``` Run `carthage update --platform ios,macosx`. @@ -104,7 +104,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`: use_frameworks! target 'YourApp' do - pod 'Socket.IO-Client-Swift', '~> 7.0.1' # Or latest version + pod 'Socket.IO-Client-Swift', '~> 7.0.3' # Or latest version end ``` @@ -133,7 +133,7 @@ CocoaSeeds Add this line to your `Seedfile`: ``` -github "socketio/socket.io-client-swift", "v7.0.1", :files => "Source/*.swift" # Or latest version +github "socketio/socket.io-client-swift", "v7.0.3", :files => "Source/*.swift" # Or latest version ``` Run `seed install`. diff --git a/Socket.IO-Client-Swift.podspec b/Socket.IO-Client-Swift.podspec index 1ccaf4b..47c0b88 100644 --- a/Socket.IO-Client-Swift.podspec +++ b/Socket.IO-Client-Swift.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Socket.IO-Client-Swift" - s.module_name = "SocketIOClientSwift" - s.version = "7.0.2" + s.module_name = "SocketIO" + s.version = "7.0.3" s.summary = "Socket.IO-client for iOS and OS X" s.description = <<-DESC Socket.IO-client for iOS and OS X. @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '9.0' - s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v7.0.2' } + s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v7.0.3' } s.source_files = "Source/**/*.swift" s.requires_arc = true # s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files From d3500d38ba8bdd61abefb3a3db924c6c373f2759 Mon Sep 17 00:00:00 2001 From: Kobe Date: Fri, 2 Sep 2016 10:46:39 +0800 Subject: [PATCH 14/15] Modify mac version base mac os 10.9 --- Socket.IO-Client-Swift.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Socket.IO-Client-Swift.podspec b/Socket.IO-Client-Swift.podspec index 47c0b88..b7e4897 100644 --- a/Socket.IO-Client-Swift.podspec +++ b/Socket.IO-Client-Swift.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |s| s.license = { :type => 'MIT' } s.author = { "Erik" => "nuclear.ace@gmail.com" } s.ios.deployment_target = '8.0' - s.osx.deployment_target = '10.10' + s.osx.deployment_target = '10.9' s.tvos.deployment_target = '9.0' s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v7.0.3' } s.source_files = "Source/**/*.swift" From 923103dec8be5bb00895c27404f3ac90ef9aeaa3 Mon Sep 17 00:00:00 2001 From: Erik Date: Fri, 2 Sep 2016 17:33:12 -0400 Subject: [PATCH 15/15] change spm name --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index f7d8304..04e8fbb 100644 --- a/Package.swift +++ b/Package.swift @@ -1,5 +1,5 @@ import PackageDescription let package = Package( - name: "SocketIOClientSwift" + name: "SocketIO" )