Screen share target extension not shown

Description
I have integrated screen sharing functionality in our application with standard zoom UI.
On Tapping the Screen option in the action sheet I don’t see the app extension for broadcasting the screen.
How can I start screen share from the app itself?
If you observe the picker it says “start recording” not “start broadcasting”

Attached the screen for reference.

But from the control center, I see the extension and was able to share the screen successfully. Attached the image.

I’m using the following code in onClickShareScreen method:

func onClickShareScreen(_ parentVC: UIViewController) {
print(“onClickShareScreen----------------”)
guard let service = MobileRTC.shared().getMeetingService() else { return }

    if service.isStartingShare() {
        service.stopAppShare()
    } else {
        service.startAppShare()
        
        if #available(iOS 12.0, *) {
            let broadcastView = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width / 2, height: UIScreen.main.bounds.size.height / 2))
            broadcastView.preferredExtension = "group.com.dayamed.va"
            let buttonPressed = NSSelectorFromString("buttonPressed:")
            if broadcastView.responds(to: buttonPressed) {
                //broadcastView.perform(buttonPressed, with: nil)
                for subview in broadcastView.subviews {
                    print("broadcastView.subviews", broadcastView.subviews)
                    if let button = subview as? UIButton {
                        button.sendActions(for: UIControl.Event.allTouchEvents)
                    }
                }
            }
        } else {
            // Fallback on earlier versions
        }
    }
}

Please let me know if I am missing anything here.

Which version?
v5.2.42037.1112

Smartphone (please complete the following information):

  • Device: iPhone Xr and iPhone 7
  • OS: iOS 13 and 14

Hey @durga.chotu,

Thanks for using the dev forum!

I believe I see the issue.
Can you try changing the line:
broadcastView.preferredExtension = "group.com.dayamed.va"
to
broadcastView.preferredExtension = "TheBundleIDOfYourBroadcastExtensionTarget"

Thanks!
Michael

Hi @Michael_Condon,

It worked thanks a lot.

1 Like

Hey @durga.chotu,

Awesome! I am happy to hear. Please let us know if you have any other questions.

Thanks!
Michael