Merge pull request #1385 from NachoSoto/master
Added support for Mac Catalyst
This commit is contained in:
commit
b686b17e0a
@ -32,7 +32,7 @@ socket.connect()
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Supports socket.io 2.0+/3.0+.
|
- Supports Socket.IO server 2.0+/3.0+/4.0+ (see the [compatibility table](https://nuclearace.github.io/Socket.IO-Client-Swift/Compatibility.html))
|
||||||
- Supports Binary
|
- Supports Binary
|
||||||
- Supports Polling and WebSockets
|
- Supports Polling and WebSockets
|
||||||
- Supports TLS/SSL
|
- Supports TLS/SSL
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
classes = {
|
classes = {
|
||||||
};
|
};
|
||||||
objectVersion = 46;
|
objectVersion = 52;
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
@ -19,9 +19,9 @@
|
|||||||
1C686BE71F869AFD007D8627 /* SocketParserTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C686BD71F869AF1007D8627 /* SocketParserTest.swift */; };
|
1C686BE71F869AFD007D8627 /* SocketParserTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C686BD71F869AF1007D8627 /* SocketParserTest.swift */; };
|
||||||
1C686BE81F869AFD007D8627 /* SocketNamespacePacketTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C686BD81F869AF1007D8627 /* SocketNamespacePacketTest.swift */; };
|
1C686BE81F869AFD007D8627 /* SocketNamespacePacketTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C686BD81F869AF1007D8627 /* SocketNamespacePacketTest.swift */; };
|
||||||
572EF2431B51F18A00EEBB58 /* SocketIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 572EF2381B51F18A00EEBB58 /* SocketIO.framework */; };
|
572EF2431B51F18A00EEBB58 /* SocketIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 572EF2381B51F18A00EEBB58 /* SocketIO.framework */; };
|
||||||
|
579C7D4C2731B487009F8A2F /* Starscream.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 579C7D4B2731B487009F8A2F /* Starscream.xcframework */; };
|
||||||
6CA08A981D615C0B0061FD2A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6CA08A971D615C0B0061FD2A /* Security.framework */; };
|
6CA08A981D615C0B0061FD2A /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6CA08A971D615C0B0061FD2A /* Security.framework */; };
|
||||||
74BF53581F894326004972D8 /* SocketIO.h in Headers */ = {isa = PBXBuildFile; fileRef = 572EF23C1B51F18A00EEBB58 /* SocketIO.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
74BF53581F894326004972D8 /* SocketIO.h in Headers */ = {isa = PBXBuildFile; fileRef = 572EF23C1B51F18A00EEBB58 /* SocketIO.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
74D0F5961F8053950037C4DC /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9432E00B1F77F883006AF628 /* Starscream.framework */; };
|
|
||||||
74DA21741F09440F009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21731F09440F009C19EE /* libz.tbd */; };
|
74DA21741F09440F009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21731F09440F009C19EE /* libz.tbd */; };
|
||||||
74DA217C1F09457B009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21731F09440F009C19EE /* libz.tbd */; };
|
74DA217C1F09457B009C19EE /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 74DA21731F09440F009C19EE /* libz.tbd */; };
|
||||||
DD52B048C71D724ABBD18C71 /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD52BDC9E66AADA2CC5E8246 /* SocketTypes.swift */; };
|
DD52B048C71D724ABBD18C71 /* SocketTypes.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD52BDC9E66AADA2CC5E8246 /* SocketTypes.swift */; };
|
||||||
@ -75,18 +75,15 @@
|
|||||||
572EF23B1B51F18A00EEBB58 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
572EF23B1B51F18A00EEBB58 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
572EF23C1B51F18A00EEBB58 /* SocketIO.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SocketIO.h; sourceTree = "<group>"; };
|
572EF23C1B51F18A00EEBB58 /* SocketIO.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SocketIO.h; sourceTree = "<group>"; };
|
||||||
572EF2421B51F18A00EEBB58 /* SocketIO-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SocketIO-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
572EF2421B51F18A00EEBB58 /* SocketIO-Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SocketIO-Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
579C7D4B2731B487009F8A2F /* Starscream.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Starscream.xcframework; path = Carthage/Build/Starscream.xcframework; sourceTree = "<group>"; };
|
||||||
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; };
|
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; };
|
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; };
|
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; };
|
||||||
749FA19F1F8112E7002FBB30 /* Starscream.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = Starscream.framework.dSYM; path = Carthage/Build/Mac/Starscream.framework.dSYM; sourceTree = "<group>"; };
|
|
||||||
749FA1A11F811408002FBB30 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
749FA1A11F811408002FBB30 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||||
74D0F58D1F804FED0037C4DC /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
|
74D0F58D1F804FED0037C4DC /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.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; };
|
74DA21731F09440F009C19EE /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||||
74DA217D1F0945E9009C19EE /* libcommonCrypto.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcommonCrypto.tbd; path = usr/lib/system/libcommonCrypto.tbd; sourceTree = SDKROOT; };
|
74DA217D1F0945E9009C19EE /* libcommonCrypto.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcommonCrypto.tbd; path = usr/lib/system/libcommonCrypto.tbd; sourceTree = SDKROOT; };
|
||||||
9432E0061F77F7CA006AF628 /* SSLSecurity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSLSecurity.swift; sourceTree = "<group>"; };
|
9432E0061F77F7CA006AF628 /* SSLSecurity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SSLSecurity.swift; sourceTree = "<group>"; };
|
||||||
9432E0091F77F87D006AF628 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/iOS/Starscream.framework; sourceTree = "<group>"; };
|
|
||||||
9432E00B1F77F883006AF628 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/Mac/Starscream.framework; sourceTree = "<group>"; };
|
|
||||||
9432E00D1F77F889006AF628 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/tvOS/Starscream.framework; sourceTree = "<group>"; };
|
|
||||||
DD52B078DB0A3C3D1BB507CD /* SocketIOClientOption.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClientOption.swift; sourceTree = "<group>"; };
|
DD52B078DB0A3C3D1BB507CD /* SocketIOClientOption.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOClientOption.swift; sourceTree = "<group>"; };
|
||||||
DD52B09F7984E730513AB7E5 /* SocketAckManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketAckManager.swift; sourceTree = "<group>"; };
|
DD52B09F7984E730513AB7E5 /* SocketAckManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketAckManager.swift; sourceTree = "<group>"; };
|
||||||
DD52B1D9BC4AE46D38D827DE /* SocketIOStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOStatus.swift; sourceTree = "<group>"; };
|
DD52B1D9BC4AE46D38D827DE /* SocketIOStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketIOStatus.swift; sourceTree = "<group>"; };
|
||||||
@ -120,8 +117,8 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
74DA21741F09440F009C19EE /* libz.tbd in Frameworks */,
|
74DA21741F09440F009C19EE /* libz.tbd in Frameworks */,
|
||||||
|
579C7D4C2731B487009F8A2F /* Starscream.xcframework in Frameworks */,
|
||||||
6CA08A981D615C0B0061FD2A /* Security.framework in Frameworks */,
|
6CA08A981D615C0B0061FD2A /* Security.framework in Frameworks */,
|
||||||
74D0F5961F8053950037C4DC /* Starscream.framework in Frameworks */,
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -231,11 +228,8 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
749FA1A11F811408002FBB30 /* Foundation.framework */,
|
749FA1A11F811408002FBB30 /* Foundation.framework */,
|
||||||
749FA19F1F8112E7002FBB30 /* Starscream.framework.dSYM */,
|
579C7D4B2731B487009F8A2F /* Starscream.xcframework */,
|
||||||
74D0F58D1F804FED0037C4DC /* libz.tbd */,
|
74D0F58D1F804FED0037C4DC /* libz.tbd */,
|
||||||
9432E0091F77F87D006AF628 /* Starscream.framework */,
|
|
||||||
9432E00B1F77F883006AF628 /* Starscream.framework */,
|
|
||||||
9432E00D1F77F889006AF628 /* Starscream.framework */,
|
|
||||||
74DA217D1F0945E9009C19EE /* libcommonCrypto.tbd */,
|
74DA217D1F0945E9009C19EE /* libcommonCrypto.tbd */,
|
||||||
74DA21731F09440F009C19EE /* libz.tbd */,
|
74DA21731F09440F009C19EE /* libz.tbd */,
|
||||||
6CA08A9E1D615C340061FD2A /* tvOS */,
|
6CA08A9E1D615C340061FD2A /* tvOS */,
|
||||||
@ -541,33 +535,9 @@
|
|||||||
"ENABLE_BITCODE[sdk=macosx*]" = NO;
|
"ENABLE_BITCODE[sdk=macosx*]" = NO;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/tvOS",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=appletvsimulator*]" = (
|
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/tvOS",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = (
|
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/iOS",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = (
|
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/iOS",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=macosx*]" = (
|
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/Mac",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=watchos*]" = (
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/watchOS",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=watchsimulator*]" = (
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/watchOS",
|
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
"$(PROJECT_DIR)/Carthage/Build/",
|
||||||
);
|
);
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
@ -616,33 +586,9 @@
|
|||||||
ENABLE_BITCODE = YES;
|
ENABLE_BITCODE = YES;
|
||||||
"ENABLE_BITCODE[sdk=macosx*]" = NO;
|
"ENABLE_BITCODE[sdk=macosx*]" = NO;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=appletvos*]" = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/tvOS",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=appletvsimulator*]" = (
|
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/tvOS",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = (
|
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/iOS",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = (
|
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/iOS",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=macosx*]" = (
|
|
||||||
"$(inherited)",
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/Mac",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=watchos*]" = (
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/watchOS",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
"FRAMEWORK_SEARCH_PATHS[sdk=watchsimulator*]" = (
|
|
||||||
"$(PROJECT_DIR)/Carthage/Build/watchOS",
|
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
"$(PROJECT_DIR)/Carthage/Build/",
|
||||||
);
|
);
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
@ -655,7 +601,8 @@
|
|||||||
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
MACOSX_DEPLOYMENT_TARGET = 10.14;
|
||||||
PRODUCT_NAME = SocketIO;
|
PRODUCT_NAME = SocketIO;
|
||||||
SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos iphonesimulator iphoneos watchos watchsimulator";
|
SUPPORTED_PLATFORMS = "macosx appletvsimulator appletvos iphonesimulator iphoneos watchos watchsimulator";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||||
VALID_ARCHS = "i386 x86_64 armv7 armv7s arm64 armv7k";
|
VALID_ARCHS = "i386 x86_64 armv7 armv7s arm64 armv7k";
|
||||||
@ -712,8 +659,16 @@
|
|||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
INFOPLIST_FILE = SocketIO/Info.plist;
|
INFOPLIST_FILE = SocketIO/Info.plist;
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@loader_path/Frameworks",
|
||||||
|
);
|
||||||
|
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
"@loader_path/../Frameworks",
|
||||||
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
@ -722,6 +677,7 @@
|
|||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SUPPORTED_PLATFORMS = "$(inherited)";
|
SUPPORTED_PLATFORMS = "$(inherited)";
|
||||||
|
SUPPORTS_MACCATALYST = YES;
|
||||||
SWIFT_INCLUDE_PATHS = "";
|
SWIFT_INCLUDE_PATHS = "";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||||
@ -778,8 +734,16 @@
|
|||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
INFOPLIST_FILE = SocketIO/Info.plist;
|
INFOPLIST_FILE = SocketIO/Info.plist;
|
||||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@loader_path/Frameworks",
|
||||||
|
);
|
||||||
|
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
"@loader_path/../Frameworks",
|
||||||
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
@ -787,6 +751,7 @@
|
|||||||
SDKROOT = macosx;
|
SDKROOT = macosx;
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SUPPORTED_PLATFORMS = "$(inherited)";
|
SUPPORTED_PLATFORMS = "$(inherited)";
|
||||||
|
SUPPORTS_MACCATALYST = YES;
|
||||||
SWIFT_INCLUDE_PATHS = "";
|
SWIFT_INCLUDE_PATHS = "";
|
||||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -862,8 +827,15 @@
|
|||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
INFOPLIST_FILE = SocketIO/Info.plist;
|
INFOPLIST_FILE = SocketIO/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks @loader_path/../Frameworks";
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@loader_path/Frameworks",
|
||||||
|
);
|
||||||
|
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
"@loader_path/../Frameworks",
|
||||||
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
@ -938,8 +910,15 @@
|
|||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
INFOPLIST_FILE = SocketIO/Info.plist;
|
INFOPLIST_FILE = SocketIO/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks @loader_path/../Frameworks";
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
"@loader_path/Frameworks",
|
||||||
|
);
|
||||||
|
"LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = (
|
||||||
|
"@executable_path/../Frameworks",
|
||||||
|
"@loader_path/../Frameworks",
|
||||||
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
MACOSX_DEPLOYMENT_TARGET = 10.10;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
|||||||
@ -751,7 +751,7 @@ extension SocketEngine {
|
|||||||
case .cancelled:
|
case .cancelled:
|
||||||
wsConnected = false
|
wsConnected = false
|
||||||
websocketDidDisconnect(error: EngineError.canceled)
|
websocketDidDisconnect(error: EngineError.canceled)
|
||||||
case let .disconnected(reason, code):
|
case .disconnected(_, _):
|
||||||
wsConnected = false
|
wsConnected = false
|
||||||
websocketDidDisconnect(error: nil)
|
websocketDidDisconnect(error: nil)
|
||||||
case let .text(msg):
|
case let .text(msg):
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import Foundation
|
|||||||
import Starscream
|
import Starscream
|
||||||
|
|
||||||
/// Specifies a SocketEngine.
|
/// Specifies a SocketEngine.
|
||||||
public protocol SocketEngineSpec: class {
|
public protocol SocketEngineSpec: AnyObject {
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
/// The client for this engine.
|
/// The client for this engine.
|
||||||
|
|||||||
@ -45,7 +45,7 @@ import Foundation
|
|||||||
/// To disconnect a socket and remove it from the manager, either call `SocketIOClient.disconnect()` on the socket,
|
/// To disconnect a socket and remove it from the manager, either call `SocketIOClient.disconnect()` on the socket,
|
||||||
/// or call one of the `disconnectSocket` methods on this class.
|
/// or call one of the `disconnectSocket` methods on this class.
|
||||||
///
|
///
|
||||||
public protocol SocketManagerSpec : AnyObject, SocketEngineClient {
|
public protocol SocketManagerSpec : SocketEngineClient {
|
||||||
// MARK: Properties
|
// MARK: Properties
|
||||||
|
|
||||||
/// Returns the socket associated with the default namespace ("/").
|
/// Returns the socket associated with the default namespace ("/").
|
||||||
|
|||||||
@ -6,11 +6,30 @@ This guide will help you navigate the changes that were introduced in v16.
|
|||||||
|
|
||||||
## Client supports multiple socket.io versions
|
## Client supports multiple socket.io versions
|
||||||
|
|
||||||
The client now supports socket.io 3 servers. This is mostly a transparent change, however if your sever
|
The client now supports socket.io 3 servers. This is mostly a transparent change, however if your server
|
||||||
is socket.io 2, you must send `.version(.two)` as an option to the manager.
|
is socket.io 2, you must send `.version(.two)` as an option to the manager.
|
||||||
|
|
||||||
```swift
|
```swift
|
||||||
SocketManager(socketURL: URL(string:"http://localhost:8087/")!, config: [.version(.two)])
|
SocketManager(socketURL: URL(string:"http://localhost:8087/")!, config: [.version(.two)])
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## How to upgrade
|
||||||
|
|
||||||
|
- first, upgrade the Socket.IO server to v4 with the compatibility mode enabled (`allowEIO3: true`)
|
||||||
|
- then, upgrade the clients to v16
|
||||||
|
- finally, once all clients have upgraded, disable the compatibility mode
|
||||||
|
|
||||||
|
You can check the version of the connection on the server side with:
|
||||||
|
|
||||||
|
```js
|
||||||
|
io.on("connection", (socket) => {
|
||||||
|
// either 3 for the 3rd revision of the protocol (Socket.IO v2) or 4 for the 4th revision (Socket.IO v3/v4)
|
||||||
|
const version = socket.conn.protocol;
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
See also:
|
||||||
|
|
||||||
|
- [Compatibility table](https://nuclearace.github.io/Socket.IO-Client-Swift/Compatibility.html)
|
||||||
|
- Migrating from 2.x to 3.0: https://socket.io/docs/v4/migrating-from-2-x-to-3-0/
|
||||||
|
- Migrating from 3.x to 4.0: https://socket.io/docs/v4/migrating-from-3-x-to-4-0/
|
||||||
|
|||||||
61
Usage Docs/Compatibility.md
Normal file
61
Usage Docs/Compatibility.md
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
Here is the compatibility table with the Node.js server:
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2">Swift Client version</th>
|
||||||
|
<th colspan="3">Socket.IO server version</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">2.x</td>
|
||||||
|
<td align="center">3.x</td>
|
||||||
|
<td align="center">4.x</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">v15.x</td>
|
||||||
|
<td align="center"><b>YES</b></td>
|
||||||
|
<td align="center"><b>YES</b><sup>1</sup></td>
|
||||||
|
<td align="center"><b>YES</b><sup>2</sup></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center">v16.x</td>
|
||||||
|
<td align="center"><b>YES</b><sup>3</sup></td>
|
||||||
|
<td align="center"><b>YES</b></td>
|
||||||
|
<td align="center"><b>YES</b></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
[1] Yes, with <code><a href="https://socket.io/docs/v4/server-initialization/#allowEIO3">allowEIO3: true</a></code> (server) and `.connectParams(["EIO": "3"])` (client):
|
||||||
|
|
||||||
|
*Server*
|
||||||
|
|
||||||
|
```js
|
||||||
|
const { createServer } = require("http");
|
||||||
|
const { Server } = require("socket.io");
|
||||||
|
|
||||||
|
const httpServer = createServer();
|
||||||
|
const io = new Server(httpServer, {
|
||||||
|
allowEIO3: true
|
||||||
|
});
|
||||||
|
|
||||||
|
httpServer.listen(8080);
|
||||||
|
```
|
||||||
|
|
||||||
|
*Client*
|
||||||
|
|
||||||
|
```swift
|
||||||
|
SocketManager(socketURL: URL(string:"http://localhost:8080/")!, config: [.connectParams(["EIO": "3"])])
|
||||||
|
```
|
||||||
|
|
||||||
|
[2] Yes, <code><a href="https://socket.io/docs/v4/server-initialization/#allowEIO3">allowEIO3: true</a></code> (server)
|
||||||
|
|
||||||
|
[3] Yes, with `.version(.two)` (client):
|
||||||
|
|
||||||
|
```swift
|
||||||
|
SocketManager(socketURL: URL(string:"http://localhost:8080/")!, config: [.version(.two)])
|
||||||
|
```
|
||||||
|
|
||||||
|
See also:
|
||||||
|
|
||||||
|
- Migrating from 2.x to 3.0: https://socket.io/docs/v4/migrating-from-2-x-to-3-0/
|
||||||
|
- Migrating from 3.x to 4.0: https://socket.io/docs/v4/migrating-from-3-x-to-4-0/
|
||||||
|
- Socket.IO protocol: https://github.com/socketio/socket.io-protocol
|
||||||
Loading…
x
Reference in New Issue
Block a user