bump starscream version
This commit is contained in:
parent
099c379272
commit
07dc3e4040
2
Cartfile
2
Cartfile
@ -1 +1 @@
|
|||||||
github "daltoniam/Starscream" ~> 2.0
|
github "daltoniam/Starscream" ~> 3.0.2
|
||||||
|
|||||||
@ -1 +1,3 @@
|
|||||||
github "daltoniam/Starscream" "2.1.1"
|
github "daltoniam/common-crypto-spm" "1.1.0"
|
||||||
|
github "daltoniam/zlib-spm" "1.1.0"
|
||||||
|
github "daltoniam/Starscream" "3.0.2"
|
||||||
|
|||||||
@ -24,8 +24,8 @@
|
|||||||
"repositoryURL": "https://github.com/daltoniam/Starscream",
|
"repositoryURL": "https://github.com/daltoniam/Starscream",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "21678c9426dde2a77152a0d5982cdb952baf0455",
|
"revision": "44ce58956fae7db22fb0106cb4ce3dbef3d06d00",
|
||||||
"version": "2.1.1"
|
"version": "3.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -8,7 +8,7 @@ let package = Package(
|
|||||||
.library(name: "SocketIO", targets: ["SocketIO"])
|
.library(name: "SocketIO", targets: ["SocketIO"])
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.package(url: "https://github.com/daltoniam/Starscream", .upToNextMajor(from: "2.1.1")),
|
.package(url: "https://github.com/daltoniam/Starscream", .upToNextMajor(from: "3.0.2")),
|
||||||
],
|
],
|
||||||
targets: [
|
targets: [
|
||||||
.target(name: "SocketIO", dependencies: ["Starscream"]),
|
.target(name: "SocketIO", dependencies: ["Starscream"]),
|
||||||
|
|||||||
@ -24,5 +24,5 @@ Pod::Spec.new do |s|
|
|||||||
'SWIFT_VERSION' => '4.0'
|
'SWIFT_VERSION' => '4.0'
|
||||||
}
|
}
|
||||||
s.source_files = "Source/SocketIO/**/*.swift", "Source/SocketIO/*.swift"
|
s.source_files = "Source/SocketIO/**/*.swift", "Source/SocketIO/*.swift"
|
||||||
s.dependency "Starscream", "~> 2.1.1"
|
s.dependency "Starscream", "~> 3.0.2"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -177,6 +177,8 @@
|
|||||||
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; };
|
||||||
|
742EAA351F8925F0006D5900 /* SocketIO.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SocketIO.h; sourceTree = "<group>"; };
|
||||||
|
742EAA361F8925F0006D5900 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
749FA19F1F8112E7002FBB30 /* Starscream.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = Starscream.framework.dSYM; path = Carthage/Build/Mac/Starscream.framework.dSYM; sourceTree = "<group>"; };
|
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; };
|
||||||
@ -297,6 +299,7 @@
|
|||||||
children = (
|
children = (
|
||||||
1C686BD11F869AF1007D8627 /* TestSocketIO */,
|
1C686BD11F869AF1007D8627 /* TestSocketIO */,
|
||||||
1C686BFD1F869E9D007D8627 /* TestSocketIOObjc */,
|
1C686BFD1F869E9D007D8627 /* TestSocketIOObjc */,
|
||||||
|
742EAA341F8925F0006D5900 /* SocketIO */,
|
||||||
6CA08A9B1D615C190061FD2A /* Frameworks */,
|
6CA08A9B1D615C190061FD2A /* Frameworks */,
|
||||||
572EF21A1B51F16C00EEBB58 /* Products */,
|
572EF21A1B51F16C00EEBB58 /* Products */,
|
||||||
572EF21B1B51F16C00EEBB58 /* SocketIO-iOS */,
|
572EF21B1B51F16C00EEBB58 /* SocketIO-iOS */,
|
||||||
@ -406,6 +409,15 @@
|
|||||||
name = tvOS;
|
name = tvOS;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
742EAA341F8925F0006D5900 /* SocketIO */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
742EAA351F8925F0006D5900 /* SocketIO.h */,
|
||||||
|
742EAA361F8925F0006D5900 /* Info.plist */,
|
||||||
|
);
|
||||||
|
path = SocketIO;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
DD52B1D10D761CEF3944A6BC /* Util */ = {
|
DD52B1D10D761CEF3944A6BC /* Util */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -1106,6 +1118,7 @@
|
|||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
"$(PROJECT_DIR)/Carthage/Build/iOS",
|
||||||
);
|
);
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
@ -1160,6 +1173,7 @@
|
|||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(SDKROOT)/Developer/Library/Frameworks",
|
"$(SDKROOT)/Developer/Library/Frameworks",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
"$(PROJECT_DIR)/Carthage/Build/iOS",
|
||||||
);
|
);
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
|||||||
@ -310,22 +310,22 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
|
|
||||||
private func createWebSocketAndConnect() {
|
private func createWebSocketAndConnect() {
|
||||||
ws?.delegate = nil // TODO this seems a bit defensive, is this really needed?
|
ws?.delegate = nil // TODO this seems a bit defensive, is this really needed?
|
||||||
ws = WebSocket(url: urlWebSocketWithSid)
|
var req = URLRequest(url: urlWebSocketWithSid)
|
||||||
|
|
||||||
if cookies != nil {
|
if cookies != nil {
|
||||||
let headers = HTTPCookie.requestHeaderFields(with: cookies!)
|
let headers = HTTPCookie.requestHeaderFields(with: cookies!)
|
||||||
for (key, value) in headers {
|
for (headerName, value) in headers {
|
||||||
ws?.headers[key] = value
|
req.setValue(value, forHTTPHeaderField: headerName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if extraHeaders != nil {
|
if extraHeaders != nil {
|
||||||
for (headerName, value) in extraHeaders! {
|
for (headerName, value) in extraHeaders! {
|
||||||
ws?.headers[headerName] = value
|
req.setValue(value, forHTTPHeaderField: headerName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ws = WebSocket(request: req)
|
||||||
ws?.callbackQueue = engineQueue
|
ws?.callbackQueue = engineQueue
|
||||||
ws?.enableCompression = compress
|
ws?.enableCompression = compress
|
||||||
ws?.delegate = self
|
ws?.delegate = self
|
||||||
@ -605,7 +605,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
// MARK: Starscream delegate conformance
|
// MARK: Starscream delegate conformance
|
||||||
|
|
||||||
/// Delegate method for connection.
|
/// Delegate method for connection.
|
||||||
public func websocketDidConnect(socket: WebSocket) {
|
public func websocketDidConnect(socket: WebSocketClient) {
|
||||||
if !forceWebsockets {
|
if !forceWebsockets {
|
||||||
probing = true
|
probing = true
|
||||||
probeWebSocket()
|
probeWebSocket()
|
||||||
@ -617,7 +617,7 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Delegate method for disconnection.
|
/// Delegate method for disconnection.
|
||||||
public func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
|
public func websocketDidDisconnect(socket: WebSocketClient, error: Error?) {
|
||||||
probing = false
|
probing = false
|
||||||
|
|
||||||
if closed {
|
if closed {
|
||||||
|
|||||||
@ -68,12 +68,12 @@ extension SocketEngineWebsocket {
|
|||||||
// MARK: Starscream delegate methods
|
// MARK: Starscream delegate methods
|
||||||
|
|
||||||
/// Delegate method for when a message is received.
|
/// Delegate method for when a message is received.
|
||||||
public func websocketDidReceiveMessage(socket: WebSocket, text: String) {
|
public func websocketDidReceiveMessage(socket: WebSocketClient, text: String) {
|
||||||
parseEngineMessage(text)
|
parseEngineMessage(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Delegate method for when binary is received.
|
/// Delegate method for when binary is received.
|
||||||
public func websocketDidReceiveData(socket: WebSocket, data: Data) {
|
public func websocketDidReceiveData(socket: WebSocketClient, data: Data) {
|
||||||
parseEngineData(data)
|
parseEngineData(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user