diff --git a/Socket.IO-Client-Swift.podspec b/Socket.IO-Client-Swift.podspec index 36c8c06..781ee3e 100644 --- a/Socket.IO-Client-Swift.podspec +++ b/Socket.IO-Client-Swift.podspec @@ -17,5 +17,6 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v8.1.0' } s.source_files = "Source/**/*.swift" s.requires_arc = true + s.pod_target_xcconfig = {'SWIFT_VERSION' => '3.0'} # s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files end diff --git a/Source/SocketAckEmitter.swift b/Source/SocketAckEmitter.swift index 6b86460..4af43e7 100644 --- a/Source/SocketAckEmitter.swift +++ b/Source/SocketAckEmitter.swift @@ -27,6 +27,10 @@ import Foundation public final class SocketAckEmitter : NSObject { let socket: SocketIOClient let ackNum: Int + + public var expected: Bool { + return ackNum != -1 + } init(socket: SocketIOClient, ackNum: Int) { self.socket = socket @@ -44,6 +48,7 @@ public final class SocketAckEmitter : NSObject { socket.emitAck(ackNum, with: items) } + } public final class OnAckCallback : NSObject {