Screen Share is running but shows black screen saying user is currently sharing their screen

I have followed the documentation in implementing iOS Screen sharing using the the app group extension. Everything is working fine but when go to share my screen I just get a black screen saying “Charlie is sharing their screen”

Hey @charlietunguyen

Thanks for using the dev forum!

Are you using the broadcast extension for this or appShareWithView?

Also, sometimes there is a delay between starting the share and it showing up on the other side. Have you waited longer than 10 seconds?

Thanks!
Michael

I am using the broadcast extension, yes I have waited for more than 10 seconds.

Hey @charlietunguyen,

Gotcha. There are a few things that can go wrong here, so lets troubleshoot :slight_smile:

First, can you verify that you have provided a valid AppGroupID in these four places:

  1. In MobileRTCSDKInitContext
  2. In MobileRTCScreenShareService within the SampleHandler
  3. In the AppGroup section of the Signing & Capabilities section within your main target
  4. In the AppGroup section of the Signing & Capabilities section within your broadcast extension target
    Also verify that the AppGroupID is the same in all of these places.

If they are all the same and are valid, can you run the broadcast extension target specifically. Then set a breakpoint in broadcastStartedWithSetupInfo. Then while your app is running can you begin a broadcast and see if that breakpoint gets hit?

Thanks!
Michael

Hey @Michael_Condon,

I have followed your debugging steps and I can confirm that AppGroupID is in the four places mentioned and matches. I’ve set a breakpoint in the broadcastStarted function and it does get hit.

Hey @charlietunguyen,

Awesome! That is good to hear. When you begin screen sharing to a meeting, are you receiving the “Charlie is sharing their screen” message on another device that is using the SDK or on one of Zoom’s client applications?

Thanks!
Michael

I’m following the same steps and having exactly the same outcome. I set that breakpoint and it was hit with an empty dictionary.

Has anyone figured this out?

Hey @mike.sanford,

Thank you for using the dev forum!

Can you answer the following so that I can help troubleshoot:
What version of the SDK are you using?
Are you using ionic?
Are you running on a physical device or simulator?

Thanks!
Michael

The version in the SDK framework is 5.4.54802.0124.
Not using ionic
Using a physical device. I have not tried the simulator.

Posting this as may this can help the next person. I got this working. The key was to NOT call MobileRTCMeetingService.startAppShare() and also use the native iOS ReplayKit picker view. For example

func addScreenSharingButton() {
    guard #available(iOS 12, *) else { return }
    let picker = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: 44, height: 44))
    picker.preferredExtension = "com.myapp.screenshare"
    picker.showsMicrophoneButton = true
    view.addSubview(picker)
}
1 Like

Hey @mike.sanford,

I am super happy to hear your issue has been resolved :slight_smile:

To explain to others who might find this post. You do not need to call startAppShare() or stopAppShare() if you are using a broadcast extension to screenshare, the handler code within your broadcast extension will handle alerting the meeting backend of a sharing event.

Thanks!
Michael