StreamLink for iOS
8.0.2.287281-045ba3c8
|
StreamLink for iOS (SL4i) is an Objective C API that allows an iOS application to exchange real-time financial data and trade messages with a Caplin Liberator server via the Web or other TCP/IP network.
It provides the following capabilities:
It is recommended that you read the Caplin StreamLink Overview to gain understanding of:
StreamLink for iOS is distributed as a multiplatform binary framework (XCFramework) containing support for both the Device Simulator and the Device. To use SL4i you should add a reference to StreamLink.xcframework in your XCode target.
To subscribe to data and receive updates to the data you need to:
The API operates asynchronously. This means that when the client application code issues a subscription request or a command to SL4i, the response is not returned immediately through the method used to issue the request or command. Instead, you must set up a listener object (SLSubscriptionListener) containing one or more callback methods. You then supply this listener to SL4i. SL4i calls the appropriate callback method(s) on the listener object to communicate data and command responses back to the client code.
Much of the SL4i API is defined as Objective C protocols. You must implement some of the protocols in order use SL4i. Others can be optionally implemented depending on the requirements of your application. These implementations effectively integrate StreamLink with your client application. There are also protocols with implementations that are built into the API, so in these cases you do not need to write your own.
As a minimum you need to implement the SLSubscriptionListener protocol. SL4i calls the SLSubscriptionListener implementation to deal with events concerning subscriptions to data.
You should also implement the SLConnectionListener protocol if you want to provide users of your application with information about the state of the connection.
StreamLink for iOS automatically handles transitions between cellular and wireless networks. This is achieved using the standard iOS SCNetworkReachability
API. As a result, StreamLink for iOS will:
Following loss of connection via a wireless network, it may take some time for StreamLink for iOS to reconnect via a cellular network; this delay is characteristic of cellular networks.