SDK for watchOS Clients (Unified API) Usage Instructions
4.2.1 build 22
Compatible with Lightstreamer Server since 7.0.
Compatible with code developed with the previous version.
Released on 11 Dec 2019

This SDK includes the resources needed to develop an application for Apple Watch that works as a client of Lightstreamer Server.

This client implements the Lightstreamer Unified Client API. The goal of the Unified API is to offer a common set of interfaces and functionalities across different languages and platforms.

This SDK is compatible with watchOS 2.0 and newer.

The library supports compilations targeted to a simulator, compilations targeted to a physical device with ARMv7k architecture, and compilations targeted to bitcode.

The library is available for import through CocoaPods or via direct traditional download.

Importing the Library via CocoaPods


To install CocoaPods, read its Getting Started guide. Then, follow these simple steps:

  • If you haven't created your podfile yet, do it by running pod init from a terminal positioned in your project's directory.
  • Edit your Podfile and add the following line:
    pod 'Lightstreamer_watchOS_Client', '4.2.1'
  • Run
    pod install
    and CocoaPods will download, verify and integrate the requested client library in your project.
  • Close Xcode and reopen it with the workspace that CocoaPods just created in your project's directory.
  • Finally, add the following import line wherever you need the client library's services:
    #import <Lightstreamer_watchOS_Client/Lightstreamer_watchOS_Client.h>

Check the CocoaPods repository for any newer version.

Importing the Library Traditionally


If CocoaPods is not for you, you can still install the library more traditionally by following these steps:

  • Download the watchOS client library's distribution from our website.
  • Unzip the library's distribution and copy the framework inside your project.
  • In your WatchKit extension target configuration:
    • In the General page, please add the client library Lightstreamer_watchOS_Client.framework in the Embedded Binaries section.
    • In the Build Phases page, add the following libraries in the Link Binary With Libraries section:
      Security.framework libiconv
    • Still in the Build Phases page, also add a final Run Script phase with the content of the fixup-framework.sh file, available on our website too.
      This helper script strips the i386 code segment from the watchOS SDK framework when doing an Archive operation.
  • Finally, add the following import line wherever you need the client library's services:
    #import <Lightstreamer_watchOS_Client/Lightstreamer_watchOS_Client.h>

Check the download site for any newer version.