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
|
||||
#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
|
||||
Constructors
|
||||
-----------
|
||||
|
||||
@ -605,7 +605,9 @@
|
||||
572EF2121B51F12F00EEBB58 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BITCODE_GENERATION_MODE = bitcode;
|
||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||
ENABLE_BITCODE = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
PRODUCT_NAME = SocketIO;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@ -615,7 +617,9 @@
|
||||
572EF2131B51F12F00EEBB58 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BITCODE_GENERATION_MODE = bitcode;
|
||||
CODE_SIGN_IDENTITY = "Developer ID Application";
|
||||
ENABLE_BITCODE = YES;
|
||||
PRODUCT_NAME = SocketIO;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
};
|
||||
|
||||
@ -518,15 +518,15 @@ public final class SocketEngine: NSObject, SocketEngineSpec, WebSocketDelegate {
|
||||
private func parseEngineMessage(var message: String, fromPolling: Bool) {
|
||||
Logger.log("Got message: %@", type: logType, args: message)
|
||||
|
||||
if fromPolling {
|
||||
fixDoubleUTF8(&message)
|
||||
}
|
||||
|
||||
let type = SocketEnginePacketType(str: (message["^(\\d)"].groups()?[1]) ?? "") ?? {
|
||||
self.checkIfMessageIsBase64Binary(message)
|
||||
return .Noop
|
||||
}()
|
||||
|
||||
if fromPolling && type != .Noop {
|
||||
fixDoubleUTF8(&message)
|
||||
}
|
||||
|
||||
switch type {
|
||||
case .Message:
|
||||
message.removeAtIndex(message.startIndex)
|
||||
|
||||
@ -117,7 +117,7 @@ struct SocketPacket {
|
||||
|
||||
message += jsonString! as String + ","
|
||||
} 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 {
|
||||
str = str["\n"] ~= "\\\\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user