Utility Methods API for Swift Native SDK
The methods on this page are utility methods that don't fit into other categories.
Disconnect
Call the disconnect method to stops the subscriptions in progress.
Methods
To disconnect the data you can use the following methods in Swift SDK.
1func disconnect( )
Sample code
1
Reconnect
Call the reconnect method to force the SDK to try and reach out PubNub.
Method(s)
To reconnect the data you can use the following method(s) in Swift SDK.
1func reconnect(at timetoken: Timetoken? = nil)
* required
| Parameter | Description |
|---|---|
| at * Type: Timetoken Default: n/a | The timetoken to reconnect the subscribe at. |
Sample code
1