diff --git a/README.md b/README.md index 64696e9..b0fcb36 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ let package = Package( .executable(name: "socket.io-test", targets: ["YourTargetName"]) ], dependencies: [ - .package(url: "https://github.com/socketio/socket.io-client-swift", .upToNextMinor(from: "13.1.0")) + .package(url: "https://github.com/socketio/socket.io-client-swift", .upToNextMinor(from: "13.2.0")) ], targets: [ .target(name: "YourTargetName", dependencies: ["SocketIO"], path: "./Path/To/Your/Sources") @@ -99,7 +99,7 @@ Then import `import SocketIO`. ### Carthage Add this line to your `Cartfile`: ``` -github "socketio/socket.io-client-swift" ~> 13.1.0 +github "socketio/socket.io-client-swift" ~> 13.2.0 ``` Run `carthage update --platform ios,macosx`. @@ -113,7 +113,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`: use_frameworks! target 'YourApp' do - pod 'Socket.IO-Client-Swift', '~> 13.1.0' + pod 'Socket.IO-Client-Swift', '~> 13.2.0' end ``` diff --git a/Socket.IO-Client-Swift.podspec b/Socket.IO-Client-Swift.podspec index 7e07ef7..e9e4fe2 100644 --- a/Socket.IO-Client-Swift.podspec +++ b/Socket.IO-Client-Swift.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "Socket.IO-Client-Swift" s.module_name = "SocketIO" - s.version = "13.1.3" + s.version = "13.2.0" s.summary = "Socket.IO-client for iOS and OS X" s.description = <<-DESC Socket.IO-client for iOS and OS X. @@ -18,7 +18,7 @@ Pod::Spec.new do |s| s.requires_arc = true s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", - :tag => 'v13.1.3', + :tag => 'v13.2.0', :submodules => true } s.pod_target_xcconfig = { diff --git a/docs/12to13.html b/docs/12to13.html index 83a90b5..84cee3e 100644 --- a/docs/12to13.html +++ b/docs/12to13.html @@ -78,6 +78,12 @@ + + + + +
+ +
diff --git a/docs/Classes/OnAckCallback.html b/docs/Classes/OnAckCallback.html index 93f1f56..c8499bb 100644 --- a/docs/Classes/OnAckCallback.html +++ b/docs/Classes/OnAckCallback.html @@ -79,6 +79,12 @@ + + + +
  • - + - security + security
    @@ -418,7 +424,7 @@ validation

    diff --git a/docs/Classes/SocketAckEmitter.html b/docs/Classes/SocketAckEmitter.html index 55cab3e..24504cf 100644 --- a/docs/Classes/SocketAckEmitter.html +++ b/docs/Classes/SocketAckEmitter.html @@ -79,6 +79,12 @@
  • + + + +
  • - + - postWait + postWait
    @@ -314,9 +319,9 @@ See SocketEnginePollable<
  • @@ -344,9 +349,9 @@ disconnect us.

  • @@ -565,9 +570,9 @@ disconnect us.

  • @@ -646,9 +651,9 @@ disconnect us.

  • - + - session + session
    @@ -960,7 +965,7 @@ disconnect us.

    Declaration

    Swift

    -
    public convenience init(client: SocketEngineClient, url: URL, options: [String: Any]?)
    +
    public required convenience init(client: SocketEngineClient, url: URL, options: [String: Any]?)
    @@ -1041,7 +1046,7 @@ disconnect us.

    Declaration

    Swift

    -
    public func connect()
    +
    open func connect()
    @@ -1068,7 +1073,7 @@ disconnect us.

    Declaration

    Swift

    -
    public func didError(reason: String)
    +
    open func didError(reason: String)
    @@ -1095,7 +1100,7 @@ disconnect us.

    Declaration

    Swift

    -
    public func disconnect(reason: String)
    +
    open func disconnect(reason: String)
    @@ -1144,7 +1149,7 @@ WebSocket mode.

    Declaration

    Swift

    -
    public func doFastUpgrade()
    +
    open func doFastUpgrade()
    @@ -1174,7 +1179,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

    Declaration

    Swift

    -
    public func flushWaitingForPostToWebSocket()
    +
    open func flushWaitingForPostToWebSocket()
    @@ -1201,7 +1206,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

    Declaration

    Swift

    -
    public func parseEngineData(_ data: Data)
    +
    open func parseEngineData(_ data: Data)
    @@ -1247,7 +1252,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

    Declaration

    Swift

    -
    public func parseEngineMessage(_ message: String)
    +
    open func parseEngineMessage(_ message: String)
    @@ -1322,7 +1327,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

    Declaration

    Swift

    -
    public func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
    +
    open func write(_ msg: String, withType type: SocketEnginePacketType, withData data: [Data])
    @@ -1418,7 +1423,7 @@ the engine is attempting to upgrade to WebSocket it does not do any POSTing.

    diff --git a/docs/Classes/SocketIOClient.html b/docs/Classes/SocketIOClient.html index ec5b045..db1cb1f 100644 --- a/docs/Classes/SocketIOClient.html +++ b/docs/Classes/SocketIOClient.html @@ -79,6 +79,12 @@
  • + +
  • @@ -296,9 +302,9 @@
  • - + - handlers + handlers
    @@ -347,6 +353,39 @@
  • +
  • +
    + + + + rawEmitView + +
    +
    +
    +
    +
    +
    +

    A view into this socket where emits do not check for binary data.

    + +

    Usage:

    +
    socket.rawEmitView.emit("myEvent", myObject)
    +
    + +

    NOTE: It is not safe to hold on to this view beyond the life of the socket.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public private(set) lazy var rawEmitView = SocketRawView(socket: self)
    + +
    +
    +
    +
    +
  • @@ -670,9 +709,9 @@ then this is only called when the client connects to that namespace.

  • @@ -789,9 +828,9 @@ will be emitted. The structure of the error data is [eventName, items, the
  • @@ -1818,7 +1857,7 @@ Called when the manager detects a broken connection, or when a manual reconnect
    diff --git a/docs/Classes/SocketManager.html b/docs/Classes/SocketManager.html index 09073cb..d1e8918 100644 --- a/docs/Classes/SocketManager.html +++ b/docs/Classes/SocketManager.html @@ -79,6 +79,12 @@
  • + +
  • - + - config + config
    @@ -496,9 +504,9 @@ called on.

  • @@ -959,9 +967,9 @@ releasing.

  • @@ -1029,7 +1037,7 @@ releasing.

    Sends an event to the server on all namespaces in this manager.

    -

    Same as emitAll(_:_:), but meant for Objective-C.

    +

    Same as emitAll(_:_:), but meant for Objective-C.

    @@ -1534,7 +1542,7 @@ Or call -

    © 2018 Erik. All rights reserved. (Last updated: 2018-03-11)

    +

    © 2018 Erik. All rights reserved. (Last updated: 2018-05-16)

    Generated by jazzy ♪♫ v0.9.1, a Realm project.

    diff --git a/docs/Classes/SocketRawAckView.html b/docs/Classes/SocketRawAckView.html new file mode 100644 index 0000000..c7fe894 --- /dev/null +++ b/docs/Classes/SocketRawAckView.html @@ -0,0 +1,313 @@ + + + + SocketRawAckView Class Reference + + + + + + + + + + + + + + + + +
    +

    + + SocketIO Docs + + (100% documented) +

    + +

    +

    + +
    +

    + + +
    + + + +
    + +
    + +
    +
    +

    SocketRawAckView

    +
    +
    +
    public final class SocketRawAckView : NSObject
    + +
    +
    +

    Class that gives a backwards compatible way to cause an emit not to recursively check for Data objects.

    + +

    Usage:

    +
    ack.rawEmitView.with(myObject)
    +
    + +
    +
    + +
    +
    +
    +
      +
    • +
      + + + + with(_:) + +
      +
      +
      +
      +
      +
      +

      Call to ack receiving this event.

      + +

      If an error occurs trying to transform items into their socket representation, a SocketClientEvent.error +will be emitted. The structure of the error data is [ackNum, items, theError]

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func with(_ items: SocketData...)
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + items + + +
      +

      A variable number of items to send when acking.

      +
      +
      +
      +
      +
      +
    • +
    • +
      + + + + with(_:) + +
      +
      +
      +
      +
      +
      +

      Call to ack receiving this event.

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func with(_ items: [Any])
      + +
      +
      +
      +

      Parameters

      + + + + + + + +
      + + items + + +
      +

      An array of items to send when acking. Use [] to send nothing.

      +
      +
      +
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + + +
    + diff --git a/docs/Classes/SocketRawView.html b/docs/Classes/SocketRawView.html new file mode 100644 index 0000000..89c13c7 --- /dev/null +++ b/docs/Classes/SocketRawView.html @@ -0,0 +1,482 @@ + + + + SocketRawView Class Reference + + + + + + + + + + + + + + + + +
    +

    + + SocketIO Docs + + (100% documented) +

    + +

    +

    + +
    +

    + + +
    + + + +
    + +
    + +
    +
    +

    SocketRawView

    +
    +
    +
    public final class SocketRawView : NSObject
    + +
    +
    +

    Class that gives a backwards compatible way to cause an emit not to recursively check for Data objects.

    + +

    Usage:

    +
    socket.rawEmitView.emit("myEvent", myObject)
    +
    + +
    +
    + +
    +
    +
    +
      +
    • +
      + + + + emit(_:_:) + +
      +
      +
      +
      +
      +
      +

      Send an event to the server, with optional data items.

      + +

      If an error occurs trying to transform items into their socket representation, a SocketClientEvent.error +will be emitted. The structure of the error data is [eventName, items, theError]

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func emit(_ event: String, _ items: SocketData...)
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + event + + +
      +

      The event to send.

      +
      +
      + + items + + +
      +

      The items to send with this event. May be left out.

      +
      +
      +
      +
      +
      +
    • +
    • +
      + + + + emit(_:with:) + +
      +
      +
      +
      +
      +
      +

      Same as emit, but meant for Objective-C

      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func emit(_ event: String, with items: [Any])
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + event + + +
      +

      The event to send.

      +
      +
      + + items + + +
      +

      The items to send with this event. Send an empty array to send no data.

      +
      +
      +
      +
      +
      +
    • +
    • +
      + + + + emitWithAck(_:_:) + +
      +
      +
      +
      +
      +
      +

      Sends a message to the server, requesting an ack.

      + +

      NOTE: It is up to the server send an ack back, just calling this method does not mean the server will ack. +Check that your server’s api will ack the event being sent.

      + +

      If an error occurs trying to transform items into their socket representation, a SocketClientEvent.error +will be emitted. The structure of the error data is [eventName, items, theError]

      + +

      Example:

      +
      socket.emitWithAck("myEvent", 1).timingOut(after: 1) {data in
      +    ...
      +}
      +
      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func emitWithAck(_ event: String, _ items: SocketData...) -> OnAckCallback
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + event + + +
      +

      The event to send.

      +
      +
      + + items + + +
      +

      The items to send with this event. May be left out.

      +
      +
      +
      +
      +

      Return Value

      +

      An OnAckCallback. You must call the timingOut(after:) method before the event will be sent.

      +
      +
      +
      +
    • +
    • +
      + + + + emitWithAck(_:with:) + +
      +
      +
      +
      +
      +
      +

      Same as emitWithAck, but for Objective-C

      + +

      NOTE: It is up to the server send an ack back, just calling this method does not mean the server will ack. +Check that your server’s api will ack the event being sent.

      + +

      Example:

      +
      socket.emitWithAck("myEvent", with: [1]).timingOut(after: 1) {data in
      +    ...
      +}
      +
      + +
      +
      +

      Declaration

      +
      +

      Swift

      +
      public func emitWithAck(_ event: String, with items: [Any]) -> OnAckCallback
      + +
      +
      +
      +

      Parameters

      + + + + + + + + + + + +
      + + event + + +
      +

      The event to send.

      +
      +
      + + items + + +
      +

      The items to send with this event. Use [] to send nothing.

      +
      +
      +
      +
      +

      Return Value

      +

      An OnAckCallback. You must call the timingOut(after:) method before the event will be sent.

      +
      +
      +
      +
    • +
    +
    +
    +
    + +
    +
    + + +
    + diff --git a/docs/Enums.html b/docs/Enums.html index 8eab7a6..9a598d2 100644 --- a/docs/Enums.html +++ b/docs/Enums.html @@ -78,6 +78,12 @@
  • + + + + + + + + + +
  • @@ -868,7 +876,7 @@ over when reconnects happen.

    diff --git a/docs/Enums/SocketIOStatus.html b/docs/Enums/SocketIOStatus.html index 01a671f..447e74e 100644 --- a/docs/Enums/SocketIOStatus.html +++ b/docs/Enums/SocketIOStatus.html @@ -79,6 +79,12 @@
  • + +
  • - + - active + active
    @@ -356,9 +362,9 @@
  • @@ -387,7 +393,7 @@
    diff --git a/docs/Enums/SocketParsableError.html b/docs/Enums/SocketParsableError.html index 6068333..34f8387 100644 --- a/docs/Enums/SocketParsableError.html +++ b/docs/Enums/SocketParsableError.html @@ -79,6 +79,12 @@
  • + + + + + + + + + + + +
  • @@ -239,7 +245,7 @@ So this should ideally be an array of one packet waiting for data.

    diff --git a/docs/Protocols/SocketEngineClient.html b/docs/Protocols/SocketEngineClient.html index b0bc03c..6eeacb1 100644 --- a/docs/Protocols/SocketEngineClient.html +++ b/docs/Protocols/SocketEngineClient.html @@ -79,6 +79,12 @@
  • + + + +
  • @@ -229,9 +235,9 @@
  • - + - postWait + postWait
    @@ -258,9 +264,9 @@
  • - + - session + session
    @@ -285,9 +291,9 @@
  • @@ -315,9 +321,9 @@ disconnect us.

  • @@ -517,7 +523,7 @@ disconnect us.

    diff --git a/docs/Protocols/SocketEngineSpec.html b/docs/Protocols/SocketEngineSpec.html index 444b110..2d7296d 100644 --- a/docs/Protocols/SocketEngineSpec.html +++ b/docs/Protocols/SocketEngineSpec.html @@ -79,6 +79,12 @@
  • + + + + + +
  • @@ -229,9 +235,9 @@
  • - + - handlers + handlers
    @@ -256,9 +262,9 @@
  • - + - manager + manager
    @@ -283,9 +289,9 @@
  • - + - nsp + nsp
    @@ -312,9 +318,42 @@
  • - + + + rawEmitView + +
    +
    +
    +
    +
    +
    +

    A view into this socket where emits do not check for binary data.

    + +

    Usage:

    +
    socket.rawEmitView.emit("myEvent", myObject)
    +
    + +

    NOTE: It is not safe to hold on to this view beyond the life of the socket.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var rawEmitView: SocketRawView
    + +
    +
    +
    +
    +
  • +
  • +
    + + - status + status
    @@ -614,9 +653,9 @@ then this is only called when the client connects to that namespace.

  • @@ -733,9 +772,9 @@ will be emitted. The structure of the error data is [eventName, items, the
  • @@ -1089,7 +1128,7 @@ socket.

    -

    Joins nsp.

    +

    Joins nsp.

    @@ -1614,7 +1653,7 @@ Called when the manager detects a broken connection, or when a manual reconnect
    diff --git a/docs/Protocols/SocketLogger.html b/docs/Protocols/SocketLogger.html index dbf3746..96fdc31 100644 --- a/docs/Protocols/SocketLogger.html +++ b/docs/Protocols/SocketLogger.html @@ -79,6 +79,12 @@ + +
  • - + - log + log
    @@ -401,7 +407,7 @@
    diff --git a/docs/Protocols/SocketManagerSpec.html b/docs/Protocols/SocketManagerSpec.html index 125a14e..0121e0d 100644 --- a/docs/Protocols/SocketManagerSpec.html +++ b/docs/Protocols/SocketManagerSpec.html @@ -79,6 +79,12 @@
  • + + + + + + + +
  • - + - event + event
    @@ -229,9 +235,9 @@
  • - + - id + id
    @@ -256,9 +262,9 @@
  • - + - callback + callback
    @@ -369,7 +375,7 @@
    diff --git a/docs/Structs/SocketIOClientConfiguration.html b/docs/Structs/SocketIOClientConfiguration.html index ee3ecdb..abe3d59 100644 --- a/docs/Structs/SocketIOClientConfiguration.html +++ b/docs/Structs/SocketIOClientConfiguration.html @@ -79,6 +79,12 @@
  • + +
  • @@ -348,9 +354,9 @@
  • - + - endIndex + endIndex
    @@ -375,9 +381,9 @@
  • - + - isEmpty + isEmpty
    @@ -402,9 +408,9 @@
  • - + - count + count
    @@ -429,9 +435,9 @@
  • - + - first + first
    @@ -453,6 +459,58 @@
  • +
  • +
    + + + + subscript(_:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public subscript(position: Index) -> Element
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + subscript(_:) + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public subscript(bounds: Range<Index>) -> SubSequence
    + +
    +
    +
    +
    +
  • @@ -467,9 +525,9 @@
  • @@ -648,7 +706,7 @@
    diff --git a/docs/Structs/SocketPacket.html b/docs/Structs/SocketPacket.html index 40caa3c..fe44cf2 100644 --- a/docs/Structs/SocketPacket.html +++ b/docs/Structs/SocketPacket.html @@ -79,6 +79,12 @@
  • + +
  • - + - nsp + nsp
    @@ -229,9 +235,9 @@
  • - + - id + id
    @@ -256,9 +262,9 @@
  • - + - type + type
    @@ -283,9 +289,9 @@
  • - + - binary + binary
    @@ -310,9 +316,9 @@
  • - + - data + data
    @@ -340,9 +346,9 @@ event type packets.

  • - + - args + args
    @@ -367,9 +373,9 @@ event type packets.

  • @@ -394,9 +400,9 @@ event type packets.

  • - + - event + event
    @@ -421,9 +427,9 @@ event type packets.

  • @@ -492,7 +498,7 @@ event type packets.

    diff --git a/docs/Structs/SocketPacket/PacketType.html b/docs/Structs/SocketPacket/PacketType.html index ef8ceca..762e552 100644 --- a/docs/Structs/SocketPacket/PacketType.html +++ b/docs/Structs/SocketPacket/PacketType.html @@ -79,6 +79,12 @@
  • + +
    diff --git a/docs/Typealiases.html b/docs/Typealiases.html index ea93e84..44f7e5e 100644 --- a/docs/Typealiases.html +++ b/docs/Typealiases.html @@ -78,6 +78,12 @@ + + + + + +