Skip to content

iOS Screen Sharing

davidliu edited this page Aug 8, 2022 · 3 revisions

Screen Sharing integration allows you to broadcast your screen through LiveKit. This document explains how to setup screen sharing on iOS for LiveKit.

Quick Setup

  1. Add a new Broadcast Upload Extension to your project.
  2. Add your app and broadcast extension to the same app group.
  3. Have your SampleHandler class extend LKSampleHandler and clear out any overrides.
  4. Override appGroupIdentifier() in `SampleHandler to return the app group identifier.

Add a new Broadcast Extension

Add a Broadcast Upload Extension through File -> New -> Target.

Fill out the required information for your extension and click Finish.

Screen Shot 2022-06-10 at 9 57 09 PM

Setup app groups

Add your extension to an app group by going to your extension's target in the project; in the Signings & Capabilities tab, click the + button in the top left and add App Groups. If you haven't done so already, add App Groups to your main app as well, ensuring that the App Group identifier is the same for both.

Setup SampleHandler

  • Edit your SampleHandler class to extend LKSampleHandler from the SDK.
  • Clear out any existing overrides, as the LKSampleHandler class takes care of handling the broadcast.
  • Override appGroupIdentifier() to return the app group identifier for your extension.

The result should look similar to the one in our example.

Your broadcast extension is now ready for broadcast.

Clone this wiki locally