The Daily Framework to make It easy add support for screen share on iOS.
In order to be able to use the screen sharing functionality for iOS, you will need to create a Broadcast Upload Extension for your App.
This framework provides all the files needed for capturing the contents of the user's screen and send It to Daily.
It is available for applications running on iOS 14 or newer.
The feature to send screen sharing is only supported when using react-native-daily-js 0.46.0 or above.
- Do not select "include UI extension".
- Recommended naming: ScreenCaptureExtension, since it’s an independent process responsible for ingesting and processing the captured video & audio frames that the OS captures and passing it to your app, which then actually sends the media via WebRTC.
If you are using react-native-daily-js
0.46.0
or later, there is a version that is already included in the pod.
Inside the target that you have created, for instance ScreenCaptureExtension
:
- Click to add a new item inside Frameworks and Libraries/
- Search for Daily to filter the options.
- Add the
ReactNativeDailyJSScreenShareExtension
.
Replace the default code that has been created by this code below:
import ReactNativeDailyJSScreenShareExtension
public class SampleHandler: DailyRPHandler {
override init() {
super.init(appGroupIdentifier: "group.co.daily.DailyPlayground")
}
}
- Add RTCAppGroupIdentifier key with your app group identifier (e.g. co.daily.DailyPlayground.group)
- Add DailyScreenCaptureExtensionBundleIdentifier key with your screen share extension’s bundle identifier (e.g. co.daily.DailyPlayground.ScreenCaptureExtension)
If you view the raw file contents of Info.plist
, it should look like this:
<dict>
...
<key>DailyScreenCaptureExtensionBundleIdentifier</key>
<string>co.daily.DailyPlayground.ScreenCaptureExtension</string>
<key>RTCAppGroupIdentifier</key>
<string>group.co.daily.DailyPlayground</string>
<key>CFBundleDevelopmentRegion</key>
...
</dict>