merge master
This commit is contained in:
commit
3d06b7dbad
13
README.md
13
README.md
@ -100,10 +100,23 @@ import Socket_IO_Client_Swift
|
|||||||
```
|
```
|
||||||
|
|
||||||
Objective-C:
|
Objective-C:
|
||||||
|
|
||||||
```Objective-C
|
```Objective-C
|
||||||
#import <Socket_IO_Client_Swift/Socket_IO_Client_Swift-Swift.h>
|
#import <Socket_IO_Client_Swift/Socket_IO_Client_Swift-Swift.h>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
CocoaSeeds
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Add this line to your `Seedfile`:
|
||||||
|
|
||||||
|
```
|
||||||
|
github "socketio/socket.io-client-swift", "v3.1.4", :files => "SocketIOClientSwift/*.swift" # Or latest version
|
||||||
|
```
|
||||||
|
|
||||||
|
Run `seed install`.
|
||||||
|
|
||||||
|
|
||||||
##API
|
##API
|
||||||
Constructors
|
Constructors
|
||||||
-----------
|
-----------
|
||||||
|
|||||||
@ -605,7 +605,9 @@
|
|||||||
572EF2121B51F12F00EEBB58 /* Debug */ = {
|
572EF2121B51F12F00EEBB58 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
BITCODE_GENERATION_MODE = bitcode;
|
||||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||||
|
ENABLE_BITCODE = YES;
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
PRODUCT_NAME = SocketIO;
|
PRODUCT_NAME = SocketIO;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
@ -615,7 +617,9 @@
|
|||||||
572EF2131B51F12F00EEBB58 /* Release */ = {
|
572EF2131B51F12F00EEBB58 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
BITCODE_GENERATION_MODE = bitcode;
|
||||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||||
|
ENABLE_BITCODE = YES;
|
||||||
PRODUCT_NAME = SocketIO;
|
PRODUCT_NAME = SocketIO;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -518,15 +518,15 @@ public final class SocketEngine: NSObject, SocketEngineSpec, WebSocketDelegate {
|
|||||||
private func parseEngineMessage(var message: String, fromPolling: Bool) {
|
private func parseEngineMessage(var message: String, fromPolling: Bool) {
|
||||||
Logger.log("Got message: %@", type: logType, args: message)
|
Logger.log("Got message: %@", type: logType, args: message)
|
||||||
|
|
||||||
if fromPolling {
|
|
||||||
fixDoubleUTF8(&message)
|
|
||||||
}
|
|
||||||
|
|
||||||
let type = SocketEnginePacketType(str: (message["^(\\d)"].groups()?[1]) ?? "") ?? {
|
let type = SocketEnginePacketType(str: (message["^(\\d)"].groups()?[1]) ?? "") ?? {
|
||||||
self.checkIfMessageIsBase64Binary(message)
|
self.checkIfMessageIsBase64Binary(message)
|
||||||
return .Noop
|
return .Noop
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
if fromPolling && type != .Noop {
|
||||||
|
fixDoubleUTF8(&message)
|
||||||
|
}
|
||||||
|
|
||||||
switch type {
|
switch type {
|
||||||
case .Message:
|
case .Message:
|
||||||
message.removeAtIndex(message.startIndex)
|
message.removeAtIndex(message.startIndex)
|
||||||
|
|||||||
@ -117,7 +117,7 @@ struct SocketPacket {
|
|||||||
|
|
||||||
message += jsonString! as String + ","
|
message += jsonString! as String + ","
|
||||||
} catch {
|
} catch {
|
||||||
Logger.error("Error creating JSON object in SocketPacket.completeMessage", type: SocketPacket.logType)
|
Logger.error("Error creating JSON object in SocketPacket.completeMessage", type: SocketPacket.logType)
|
||||||
}
|
}
|
||||||
} else if var str = arg as? String {
|
} else if var str = arg as? String {
|
||||||
str = str["\n"] ~= "\\\\n"
|
str = str["\n"] ~= "\\\\n"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user