Sample Integrations

Run the StreamLayer iOS SDK sample app to see a working integration with a basic video player and channel switching.

The StreamLayer SDK ships with a sample app that demonstrates a minimal working integration — a basic video player with channel switching and the StreamLayer Element active. Use this as a starting point and expand it for your own use case.

Sample Project: Sample Example Application


Bootstrap

Before getting started, review the provided Makefile for available commands to bootstrap the project.


Prerequisites

Ensure your development environment meets the following requirements:

  • Xcode 16.0 or higher. If needed, set the correct Xcode path:

    sudo xcode-select -s /Applications/Xcode.app

Integration Steps

  1. Install Dependencies: Run make from the terminal to install all required dependencies.

  2. Open the Project: The process automatically opens SwiftDemo.xcodeproj in Xcode.

  3. Provide Your SDK API Key:

    StreamLayer.initSDK(with: "YOUR_API_KEY", delegate: self, loggerDelegate: self)

    To connect to the demo server, use the demo API key provided during your onboarding process.


This sample provides a foundational implementation to help you understand how the StreamLayer SDK works. Modify and expand it to suit your application's requirements.


Related