Screen sharing on iOS is not the simplest developer endeavor. Many things can cause screen sharing to not work, so we have compiled a list of common troubleshooting techniques to get screen sharing up and running in your Zoom iOS SDK application.
Scenarios:
1. Nothing happens when I begin broadcasting.
This is the most common issue when implementing screen sharing. The majority of the time, this is caused by the App Group ID. The app group must be valid and set in four different locations in Xcode.
- Pass the ID as a string value into your MobileRTCSDKInitContext object wherever you initialize the SDK.
let mobileInitContext = MobileRTCSDKInitContext()
mobileInitContext.appGroupId = 'group.com.yourTeam.yourAppGroupID'
- Pass the ID as a string value in your MobileRTCScreenShareService object within your BroadCast Extension target. This is likely within a class called 'SampleHandler'.
self.screenShareService = MobileRTCScreenShareService()
screenShareService?.appGroup = 'group.com.yourTeam.yourAppGroupID'
- Set the App Group in the 'Signing & Capabilities' tab of your main target.
- Set the App Group in the 'Signing & Capabilities' tab of your Broadcast Extension target.
The ID must be identical in all four of these places. If one of these values is different than the others, the screen share will not show in the meeting.
2. I am using the MobileRTCSample application, but I still cant broadcast.
As of version 5.4.54802.0124, screen sharing via Broadcasting is functional. However, the App Group ID set by default, 'group.zoom.us.MobileRTCSampleExtensionReplayKit,' will not work for you. You must provide your own App Group ID in the four places mentioned in the above section. Also, verify that the provisioning profile settings are properly set.
3. I don't want to use a Broadcast Extension, but I would like to broadcast it to the meeting.
The SDK uses ReplayKit to send the video and audio data from the device. Without using a broadcast extension, the SDK cannot properly broadcast.
4. I imported both MobileRTC.framework and MobileRTCScreenShare.framework, but I am getting errors when I build
- The MobileRTC framework should be imported in your main target and not in the Broadcast Extension target. Make sure it is set to 'Embed & Sign'.
- The MobileRTCScreenShare framework should be imported into your Broadcast Extension target and not your main target. Make sure it is set to 'Do not embed'.
5. After importing MobileRTCScreenShare.framework in my Broadcast Extension target, I get over 50 errors.
- Make sure you have also imported the other required frameworks in your Broadcast Extension target: CoreGraphics, CoreMedia, CoreVideo, ReplayKit, VideoToolbox. Make sure all of these are set to 'Do not embed'.
- If you are using Objective-C in your Broadcast Extension target, make sure your SampleHandler source file is named 'SampleHandler.mm' and not 'SampleHandler.m'
- If you are using Swift in your Broadcast Extension target, make sure you have added '-lc++' to 'Other linker flags' in your build settings.
6. I do not see my app in the broadcast picker.
Please follow the same steps in the 'Nothing happens when I begin broadcasting' section.