diff --git a/Cartfile b/Cartfile new file mode 100644 index 0000000..2ef3a0d --- /dev/null +++ b/Cartfile @@ -0,0 +1 @@ +github "daltoniam/Starscream" ~> 2.0 \ No newline at end of file diff --git a/Cartfile.resolved b/Cartfile.resolved new file mode 100644 index 0000000..be023fb --- /dev/null +++ b/Cartfile.resolved @@ -0,0 +1 @@ +github "daltoniam/Starscream" "2.1.1" diff --git a/Socket.IO-Client-Swift.xcodeproj/project.pbxproj b/Socket.IO-Client-Swift.xcodeproj/project.pbxproj index 3b09edc..bc243c9 100644 --- a/Socket.IO-Client-Swift.xcodeproj/project.pbxproj +++ b/Socket.IO-Client-Swift.xcodeproj/project.pbxproj @@ -30,12 +30,16 @@ 7472C65F1BCAC46E003CA70D /* SocketSideEffectTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7472C65E1BCAC46E003CA70D /* SocketSideEffectTest.swift */; }; 7472C6601BCAC46E003CA70D /* SocketSideEffectTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7472C65E1BCAC46E003CA70D /* SocketSideEffectTest.swift */; }; 747BC59F1D5F9BA200CA5FA4 /* SocketIOClientConfigurationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 747BC59E1D5F9BA200CA5FA4 /* SocketIOClientConfigurationTest.swift */; }; - 74DA21721F094408009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21711F094408009C19EE /* libz.tbd */; }; 74DA21741F09440F009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21731F09440F009C19EE /* libz.tbd */; }; - 74DA21761F094417009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21751F094417009C19EE /* libz.tbd */; }; 74DA217C1F09457B009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21731F09440F009C19EE /* libz.tbd */; }; 74F124F01BC574CF002966F4 /* SocketBasicPacketTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F124EF1BC574CF002966F4 /* SocketBasicPacketTest.swift */; }; 74F124F11BC574CF002966F4 /* SocketBasicPacketTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74F124EF1BC574CF002966F4 /* SocketBasicPacketTest.swift */; }; + 9432E0071F77F7CA006AF628 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9432E0061F77F7CA006AF628 /* SSLSecurity.swift */; }; + 9432E00A1F77F87D006AF628 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9432E0091F77F87D006AF628 /* Starscream.framework */; }; + 9432E00C1F77F883006AF628 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9432E00B1F77F883006AF628 /* Starscream.framework */; }; + 9432E00E1F77F889006AF628 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9432E00D1F77F889006AF628 /* Starscream.framework */; }; + 9432E00F1F77F8C4006AF628 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9432E0061F77F7CA006AF628 /* SSLSecurity.swift */; }; + 9432E0101F77F8C4006AF628 /* SSLSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9432E0061F77F7CA006AF628 /* SSLSecurity.swift */; }; DD52B048C71D724ABBD18C71 /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD52BDC9E66AADA2CC5E8246 /* SocketTypes.swift */; }; DD52B06F898CD9164AC8F80E /* SocketAnyEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD52B5A9DE10C7A8AD35617F /* SocketAnyEvent.swift */; }; DD52B099A5166C5FF975FAB5 /* SocketClientManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD52B282975446C9A9C56D7B /* SocketClientManager.swift */; }; @@ -126,41 +130,6 @@ remoteGlobalIDString = 576349FA1BD9B46A00E19CD7; remoteInfo = "SocketIO-tvOS"; }; - 74B3C8391F7F3ECE007D96C8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 33CCF0921F5DDC030099B092; - remoteInfo = StarscreamSocketIO; - }; - 74B3C83B1F7F3ECE007D96C8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 335FA2021F5DF71D00F6D2EC; - remoteInfo = "Starscream Tests"; - }; - 74B3C8411F7F3F93007D96C8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 33CCF0841F5DDC030099B092; - remoteInfo = StarscreamSocketIO; - }; - 74B3C8431F7F3F98007D96C8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 33CCF0841F5DDC030099B092; - remoteInfo = StarscreamSocketIO; - }; - 74B3C8451F7F3F9C007D96C8 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 33CCF0841F5DDC030099B092; - remoteInfo = StarscreamSocketIO; - }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ @@ -182,15 +151,16 @@ 742D150B1CA5794B00BD987D /* SocketObjectiveCTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SocketObjectiveCTest.m; sourceTree = ""; }; 74321DC91C2D939A00CF6F43 /* SocketAckManagerTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocketAckManagerTest.swift; sourceTree = ""; }; 74321DCA1C2D939A00CF6F43 /* SocketParserTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocketParserTest.swift; sourceTree = ""; }; - 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Starscream.xcodeproj; path = Source/Starscream/Starscream.xcodeproj; sourceTree = ""; }; 7472C65B1BCAB53E003CA70D /* SocketNamespacePacketTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketNamespacePacketTest.swift; sourceTree = ""; }; 7472C65E1BCAC46E003CA70D /* SocketSideEffectTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketSideEffectTest.swift; sourceTree = ""; }; 747BC59E1D5F9BA200CA5FA4 /* SocketIOClientConfigurationTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClientConfigurationTest.swift; sourceTree = ""; }; - 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; }; 74DA21731F09440F009C19EE /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; - 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; }; 74DA217D1F0945E9009C19EE /* libcommonCrypto.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcommonCrypto.tbd; path = usr/lib/system/libcommonCrypto.tbd; sourceTree = SDKROOT; }; 74F124EF1BC574CF002966F4 /* SocketBasicPacketTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketBasicPacketTest.swift; sourceTree = ""; }; + 9432E0061F77F7CA006AF628 /* SSLSecurity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSLSecurity.swift; sourceTree = ""; }; + 9432E0091F77F87D006AF628 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/iOS/Starscream.framework; sourceTree = ""; }; + 9432E00B1F77F883006AF628 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/Mac/Starscream.framework; sourceTree = ""; }; + 9432E00D1F77F889006AF628 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/tvOS/Starscream.framework; sourceTree = ""; }; DD52B078DB0A3C3D1BB507CD /* SocketIOClientOption.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClientOption.swift; sourceTree = ""; }; DD52B09F7984E730513AB7E5 /* SocketAckManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketAckManager.swift; sourceTree = ""; }; DD52B1D9BC4AE46D38D827DE /* SocketIOClientStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClientStatus.swift; sourceTree = ""; }; @@ -220,8 +190,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 74DA21721F094408009C19EE /* libz.tbd in Frameworks */, 6CA08A961D615C040061FD2A /* Security.framework in Frameworks */, + 9432E00A1F77F87D006AF628 /* Starscream.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -239,6 +209,7 @@ files = ( 74DA21741F09440F009C19EE /* libz.tbd in Frameworks */, 6CA08A981D615C0B0061FD2A /* Security.framework in Frameworks */, + 9432E00C1F77F883006AF628 /* Starscream.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -255,8 +226,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 74DA21761F094417009C19EE /* libz.tbd in Frameworks */, 6CA08A9A1D615C140061FD2A /* Security.framework in Frameworks */, + 9432E00E1F77F889006AF628 /* Starscream.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -274,7 +245,6 @@ 572EF20D1B51F12F00EEBB58 = { isa = PBXGroup; children = ( - 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */, 6CA08A9B1D615C190061FD2A /* Frameworks */, 572EF21A1B51F16C00EEBB58 /* Products */, 572EF21B1B51F16C00EEBB58 /* SocketIO-iOS */, @@ -370,10 +340,11 @@ 6CA08A9B1D615C190061FD2A /* Frameworks */ = { isa = PBXGroup; children = ( + 9432E0091F77F87D006AF628 /* Starscream.framework */, + 9432E00B1F77F883006AF628 /* Starscream.framework */, + 9432E00D1F77F889006AF628 /* Starscream.framework */, 74DA217D1F0945E9009C19EE /* libcommonCrypto.tbd */, - 74DA21751F094417009C19EE /* libz.tbd */, 74DA21731F09440F009C19EE /* libz.tbd */, - 74DA21711F094408009C19EE /* libz.tbd */, 6CA08A9E1D615C340061FD2A /* tvOS */, 6CA08A9D1D615C2C0061FD2A /* Mac */, 6CA08A9C1D615C270061FD2A /* iOS */, @@ -405,15 +376,6 @@ name = tvOS; sourceTree = ""; }; - 74638B5B1F111CD000F5E1FF /* Products */ = { - isa = PBXGroup; - children = ( - 74B3C83A1F7F3ECE007D96C8 /* StarscreamSocketIO.framework */, - 74B3C83C1F7F3ECE007D96C8 /* Starscream Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; DD52B1D10D761CEF3944A6BC /* Util */ = { isa = PBXGroup; children = ( @@ -422,6 +384,7 @@ DD52B471D780013E18DF9335 /* SocketExtensions.swift */, DD52BA240D139F72633D4159 /* SocketStringReader.swift */, DD52B282975446C9A9C56D7B /* SocketClientManager.swift */, + 9432E0061F77F7CA006AF628 /* SSLSecurity.swift */, ); name = Util; path = Source/SocketIO/Util; @@ -518,7 +481,6 @@ buildRules = ( ); dependencies = ( - 74B3C8461F7F3F9C007D96C8 /* PBXTargetDependency */, ); name = "SocketIO-iOS"; productName = "SocketIO-iOS"; @@ -555,7 +517,6 @@ buildRules = ( ); dependencies = ( - 74B3C8441F7F3F98007D96C8 /* PBXTargetDependency */, ); name = "SocketIO-Mac"; productName = "SocketIO-Mac"; @@ -592,7 +553,6 @@ buildRules = ( ); dependencies = ( - 74B3C8421F7F3F93007D96C8 /* PBXTargetDependency */, ); name = "SocketIO-tvOS"; productName = "SocketIO-iOS"; @@ -653,12 +613,6 @@ mainGroup = 572EF20D1B51F12F00EEBB58; productRefGroup = 572EF21A1B51F16C00EEBB58 /* Products */; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 74638B5B1F111CD000F5E1FF /* Products */; - ProjectRef = 74638B5A1F111CD000F5E1FF /* Starscream.xcodeproj */; - }, - ); projectRoot = ""; targets = ( 572EF2181B51F16C00EEBB58 /* SocketIO-iOS */, @@ -671,23 +625,6 @@ }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 74B3C83A1F7F3ECE007D96C8 /* StarscreamSocketIO.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = StarscreamSocketIO.framework; - remoteRef = 74B3C8391F7F3ECE007D96C8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 74B3C83C1F7F3ECE007D96C8 /* Starscream Tests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "Starscream Tests.xctest"; - remoteRef = 74B3C83B1F7F3ECE007D96C8 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ 572EF2171B51F16C00EEBB58 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -749,6 +686,7 @@ DD52B06F898CD9164AC8F80E /* SocketAnyEvent.swift in Sources */, DD52B16128003D74FC23A01F /* SocketIOClient.swift in Sources */, DD52BDB51FE41BAB49073BEF /* SocketEventHandler.swift in Sources */, + 9432E0071F77F7CA006AF628 /* SSLSecurity.swift in Sources */, DD52BB88BD4C5641CFD2E8D4 /* SocketIOClientSpec.swift in Sources */, DD52B1FEE4C81226884B1E67 /* SocketIOClientOption.swift in Sources */, DD52B6E44917CA5DFC3CE6B5 /* SocketIOClientStatus.swift in Sources */, @@ -789,6 +727,7 @@ DD52BB69B6D260035B652CA4 /* SocketAnyEvent.swift in Sources */, DD52BF924BEF05E1235CFD29 /* SocketIOClient.swift in Sources */, DD52BFEB4DBD3BF8D93DAEFF /* SocketEventHandler.swift in Sources */, + 9432E00F1F77F8C4006AF628 /* SSLSecurity.swift in Sources */, DD52BB9A3E42FF2DD6BE7C2F /* SocketIOClientSpec.swift in Sources */, DD52B2AFE7D46039C7AE4D19 /* SocketIOClientOption.swift in Sources */, DD52BE4D1E6BB752CD9614A6 /* SocketIOClientStatus.swift in Sources */, @@ -833,6 +772,7 @@ DD52B6BE1D398DBD144C4D14 /* SocketAnyEvent.swift in Sources */, DD52B26DA9E4D566276B7E49 /* SocketIOClient.swift in Sources */, DD52B27DABA4C475B850A326 /* SocketEventHandler.swift in Sources */, + 9432E0101F77F8C4006AF628 /* SSLSecurity.swift in Sources */, DD52B4223DCCB75630441370 /* SocketIOClientSpec.swift in Sources */, DD52B6FC2F0A6A3106FFCBE3 /* SocketIOClientOption.swift in Sources */, DD52B3D941DB2A0C678F8251 /* SocketIOClientStatus.swift in Sources */, @@ -876,21 +816,6 @@ target = 576349FA1BD9B46A00E19CD7 /* SocketIO-tvOS */; targetProxy = 57634A3D1BD9B4B800E19CD7 /* PBXContainerItemProxy */; }; - 74B3C8421F7F3F93007D96C8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = StarscreamSocketIO; - targetProxy = 74B3C8411F7F3F93007D96C8 /* PBXContainerItemProxy */; - }; - 74B3C8441F7F3F98007D96C8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = StarscreamSocketIO; - targetProxy = 74B3C8431F7F3F98007D96C8 /* PBXContainerItemProxy */; - }; - 74B3C8461F7F3F9C007D96C8 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = StarscreamSocketIO; - targetProxy = 74B3C8451F7F3F9C007D96C8 /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -930,7 +855,7 @@ ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = SocketIO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 3.0; TVOS_DEPLOYMENT_TARGET = 9.0; WATCHOS_DEPLOYMENT_TARGET = 2.0; }; @@ -969,7 +894,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_NAME = SocketIO; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 3.0; TVOS_DEPLOYMENT_TARGET = 9.0; WATCHOS_DEPLOYMENT_TARGET = 2.0; }; @@ -1003,6 +928,10 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1027,7 +956,6 @@ SKIP_INSTALL = YES; SWIFT_INCLUDE_PATHS = $SRCROOT/zlib; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -1064,6 +992,10 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1080,7 +1012,6 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_INCLUDE_PATHS = $SRCROOT/zlib; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -1216,6 +1147,11 @@ ENABLE_BITCODE = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -1245,7 +1181,7 @@ SKIP_INSTALL = YES; SWIFT_INCLUDE_PATHS = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1282,6 +1218,11 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/iOS", + "$(PROJECT_DIR)/Carthage/Build/Mac", + ); FRAMEWORK_VERSION = A; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; @@ -1303,7 +1244,7 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_INCLUDE_PATHS = ""; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1365,7 +1306,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.0; }; name = Debug; @@ -1417,7 +1358,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "io.socket.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_SWIFT3_OBJC_INFERENCE = On; SWIFT_VERSION = 4.0; }; name = Release; @@ -1450,6 +1391,10 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/tvOS", + ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1512,6 +1457,10 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Carthage/Build/tvOS", + ); GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/Source/SocketIO/Client/SocketIOClientOption.swift b/Source/SocketIO/Client/SocketIOClientOption.swift index e258bbd..10b521e 100644 --- a/Source/SocketIO/Client/SocketIOClientOption.swift +++ b/Source/SocketIO/Client/SocketIOClientOption.swift @@ -23,7 +23,7 @@ // THE SOFTWARE. import Foundation -import StarscreamSocketIO +import Starscream protocol ClientOption : CustomStringConvertible, Equatable { func getSocketIOOptionValue() -> Any diff --git a/Source/SocketIO/Engine/SocketEngine.swift b/Source/SocketIO/Engine/SocketEngine.swift index 9553757..c07ffe4 100644 --- a/Source/SocketIO/Engine/SocketEngine.swift +++ b/Source/SocketIO/Engine/SocketEngine.swift @@ -24,7 +24,7 @@ import Dispatch import Foundation -import StarscreamSocketIO +import Starscream /// The class that handles the engine.io protocol and transports. /// See `SocketEnginePollable` and `SocketEngineWebsocket` for transport specific methods. @@ -134,7 +134,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll private var pongsMissedMax = 0 private var probeWait = ProbeWaitQueue() private var secure = false - private var security: SSLSecurity? + private var security: SocketIO.SSLSecurity? private var selfSigned = false // MARK: Initializers @@ -330,7 +330,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll ws?.enableCompression = compress ws?.delegate = self ws?.disableSSLCertValidation = selfSigned - ws?.security = security + ws?.security = security?.security ws?.connect() } diff --git a/Source/SocketIO/Engine/SocketEngineSpec.swift b/Source/SocketIO/Engine/SocketEngineSpec.swift index 0f549db..4dba805 100644 --- a/Source/SocketIO/Engine/SocketEngineSpec.swift +++ b/Source/SocketIO/Engine/SocketEngineSpec.swift @@ -24,7 +24,7 @@ // import Foundation -import StarscreamSocketIO +import Starscream /// Specifies a SocketEngine. @objc public protocol SocketEngineSpec { diff --git a/Source/SocketIO/Engine/SocketEngineWebsocket.swift b/Source/SocketIO/Engine/SocketEngineWebsocket.swift index 7e432aa..75da709 100644 --- a/Source/SocketIO/Engine/SocketEngineWebsocket.swift +++ b/Source/SocketIO/Engine/SocketEngineWebsocket.swift @@ -24,7 +24,7 @@ // import Foundation -import StarscreamSocketIO +import Starscream /// Protocol that is used to implement socket.io WebSocket support public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate { diff --git a/Source/SocketIO/Util/SSLSecurity.swift b/Source/SocketIO/Util/SSLSecurity.swift new file mode 100644 index 0000000..05f424f --- /dev/null +++ b/Source/SocketIO/Util/SSLSecurity.swift @@ -0,0 +1,30 @@ +// +// SSLSecurity.swift +// SocketIO-iOS +// +// Created by Lukas Schmidt on 24.09.17. +// + +import Starscream + +public class SSLSecurity: NSObject { + public let security: Starscream.SSLSecurity + + init(security: Starscream.SSLSecurity) { + self.security = security + } + + public convenience init(usePublicKeys: Bool = true) { + let security = Starscream.SSLSecurity(usePublicKeys: usePublicKeys) + self.init(security: security) + } + + public convenience init(certs: [SSLCert], usePublicKeys: Bool) { + let security = Starscream.SSLSecurity(certs: certs, usePublicKeys: usePublicKeys) + self.init(security: security) + } + + public func isValid(_ trust: SecTrust, domain: String?) -> Bool { + return security.isValid(trust, domain: domain) + } +} diff --git a/Source/SocketIO/Util/SocketExtensions.swift b/Source/SocketIO/Util/SocketExtensions.swift index 3959f6d..e80cf6e 100644 --- a/Source/SocketIO/Util/SocketExtensions.swift +++ b/Source/SocketIO/Util/SocketExtensions.swift @@ -23,7 +23,7 @@ // THE SOFTWARE. import Foundation -import StarscreamSocketIO +import Starscream enum JSONError : Error { case notArray