Compare commits

...
4 Commits
Author SHA1 Message Date
Erik fd21ca00d3 bump version 2015-09-14 15:44:43 -04:00
Erik f818d64405 fix socketio/socket.io-client-swift#177 2015-09-14 15:40:13 -04:00
Erik Little 55289d69a3 Update README.md 2015-09-14 13:16:33 -04:00
Erik 5dc0dfa9aa change travis icon to point to master 2015-09-14 13:15:20 -04:00
5 changed files with 14 additions and 9 deletions

No files matched your search

+4 -3
View File
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/socketio/socket.io-client-swift.svg?branch=swift-2)](https://travis-ci.org/socketio/socket.io-client-swift)
[![Build Status](https://travis-ci.org/socketio/socket.io-client-swift.svg?branch=master)](https://travis-ci.org/socketio/socket.io-client-swift)
#Socket.IO-Client-Swift
Socket.IO-client for iOS/OS X.
@@ -57,13 +57,14 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:@"localhost:8
Requires Swift 2/Xcode 7
If you need Swift 1.2/Xcode 6.3/4 use v2.4.5 (Pre-Swift 2 support is no longer maintained)
If you need Swift 1.1/Xcode 6.2 use v1.5.2. (Pre-Swift 1.2 support is no longer maintained)
Carthage
-----------------
Add this line to your `Cartfile`:
```
github "socketio/socket.io-client-swift" ~> 3.0.0 # Or latest version
github "socketio/socket.io-client-swift" ~> 3.0.1 # Or latest version
```
Run `carthage update`.
@@ -82,7 +83,7 @@ source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Socket.IO-Client-Swift', '~> 3.0.0' # Or latest version
pod 'Socket.IO-Client-Swift', '~> 3.0.1' # Or latest version
```
Install pods:
+2 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Socket.IO-Client-Swift"
s.version = "3.0.0"
s.version = "3.0.1"
s.summary = "Socket.IO-client for iOS and OS X"
s.description = <<-DESC
Socket.IO-client for iOS and OS X.
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.author = { "Erik" => "nuclear.ace@gmail.com" }
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v3.0.0' }
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v3.0.1' }
s.source_files = "SocketIOClientSwift/**/*.swift"
s.requires_arc = true
# s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files
+1
View File
@@ -502,6 +502,7 @@ public final class SocketEngine: NSObject, WebSocketDelegate {
}
private func parseEngineData(data: NSData) {
Logger.log("Got binary data: %@", type: "SocketEngine", args: data)
client?.parseBinaryData(data.subdataWithRange(NSMakeRange(1, data.length - 1)))
}
+1 -1
View File
@@ -54,7 +54,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
private var ackHandlers = SocketAckManager()
private var currentAck = -1
internal var waitingData = [SocketPacket]()
var waitingData = [SocketPacket]()
/**
Create a new SocketIOClient. opts can be omitted
+6 -3
View File
@@ -156,10 +156,13 @@ class SocketParser {
return
}
let shouldExecute = socket.waitingData[0].addData(data)
guard shouldExecute else { return }
let shouldExecute = socket.waitingData[socket.waitingData.count - 1].addData(data)
var packet = socket.waitingData.removeAtIndex(0)
guard shouldExecute else {
return
}
var packet = socket.waitingData.removeLast()
packet.fillInPlaceholders()
if packet.type != .BinaryAck {