Skip to main content

Development environment

You need Xcode 14.0 or later, and the phone must run iOS 16.0 or later (the SDK’s minimum system requirement starting with 2.1.0; versions before 2.1.0 need iOS 12 or later to use screen recording).

Create the extension

In your existing project, choose [New] -> [Target…] and select [Broadcast Upload Extension], as shown: Set the Product Name. After you click [Finish], the project has a new directory named after the Product Name you entered, containing a system-generated SampleHandler class that handles screen recording, plus a corresponding Product Name SetupUI directory containing a system-generated BroadcastSetupViewController class that handles the screen recording UI.

Add the SDK dependency to the extension

To integrate MeetingKit.framework into the screen recording extension, update the Podfile and run pod install, as shown:

Add background permissions to the host app

In the host project, go to [TARGETS] -> [Signing & Capabilities] -> [Capability] and select [Background Modes], as shown: Double-click to add it, then check [Audio, AirPlay, and Picture in Picture], as shown:

Integration steps

1. Where you need the recording service, import #import <MeetingKit/MeetingKit.h> and create an RPSystemBroadcastPickerView object, as shown: 2. To customize the button, replace the RPSystemBroadcastPickerView button as follows. If the page below appears after the broadcastButton event fires, the extension is integrated successfully: 3. In the host project, pass in MeetingKitRoomDelegate when creating the room instance, and implement the screen sharing status callback:
Starting with 2.0.0, the process-side screen capture integration (broadcastStartedWithAppGroup:delegate:, sendSampleBuffer:withType:) stays on the MeetingKit singleton, while the screen sharing status callback has moved to MeetingKitRoomDelegate along with the other in-meeting events, and carries the room instance the event came from. To stop sharing, call stopScreenRecord on the room instance.
4. Implement the RTCScreenDelegate delegate in the screen extension’s SampleHandler:
5. Start screen recording in the screen extension’s SampleHandler:
6. Send shared screen frames in the screen extension’s SampleHandler: