Share Screen Button Shows on Simulator but not on device

Description
I have successfully implemented Joining a meeting, I am facing issues with Share Screen, I have followed all the steps on https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share

I can see the Screen button appear under Share Content when the app runs on simulator but as soon as I run the app on device the Screen button doesn’t shows.

When I click on the share button on the simulator nothing happens I have also implemented the https://developer.apple.com/documentation/replaykit/rpsystembroadcastpickerview inside
func onClickShareScreen(_ parentVC: UIViewController)

Which version?
ios-mobilertc-all-5

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Join meeting
  2. Click on ‘Share Content’

Smartphone (please complete the following information):

  • Device: iPhone 7 Plus
  • OS: iOS 13
  • Version 13.5.1

Hi @IOSDev,

Thanks for using Zoom SDK. Are you getting any errors when running on the device? Is the share button the only one that is not working? Is this happening with our demo app? If so, could you provide the steps to reproduce this issue? Could you try to switch to the device-only iOS SDK(The one downloaded from the master branch of Github repo: https://github.com/zoom/zoom-sdk-ios) and see if the share button shows up with the same code?

Thanks!

Thanks @carson.zoom, your solution did not fix the issue.

I created a new project and did all the same steps and it just worked.

Also For anyone using Swift and wondering how to trigger RPSystemBroadcastPickerView when you Click Screen Share Here is what you need to do it works 100% tested on Xcode 11.5, Swift 5:

import ReplayKit

extension ViewController: MobileRTCMeetingServiceDelegate{
 func onClickShareScreen(_ parentVC: UIViewController) {
        print("Share Screen")
 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 = "Replace Your Broadcast Extension Bundle ID"
        let buttonPressed = NSSelectorFromString("buttonPressed:")
        if broadcastView.responds(to: buttonPressed) {
            broadcastView.perform(buttonPressed, with: nil)
        }
 }
}

@IOSDev Glad to hear that you have found the solution and thanks for sharing. Happy Zooming!

@carson.zoom Hello i’m facing issue while screen share just press “Screen” but nothing to happened kindly suggest me to solve it.

Hi @piyushk,

If you follow the instructions to implement the screen share feature: https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share, you could use what iOSDev has suggested above to implement a broadcast picker to bring up your broadcast extension.

Please note that implementing the onClickShareScreen will only show the “Share” button in the UI and have a corresponding callback when the “Share” button is pressed. In order to perform the screen sharing, you need to trigger the broadcast picker in this callback so that when the “Share” button is pressed, the screen share will starts.

Thanks!

I had also implement it’s call back like following but just showing “Screen” button and when pressing it just open BroadcastPicker then startBroadcasting but nothing to happen after then.

func onClickShareScreen(_ parentVC: UIViewController) {
    
    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 = "com.kjlaw.crear.ScreenShare"
        let buttonPressed = NSSelectorFromString("buttonPressed:")
        if broadcastView.responds(to: buttonPressed) {
            //ms?.startAppShare()
            //ms?.isDirectAppShareMeeting()
            broadcastView.perform(buttonPressed, with: nil)
        }
    } else {
        // Fallback on earlier versions
    }
    print("Start Screen Sharing")

}

Please check the deployment target it must be same for your App target and Broadcast Extension.

Also make sure your have same group name updated in AppDelegate and Samplehandler.m

Hey @piyushk

@IOSDev is correct. The app group name must be set, the samplehandler must be implemented, and the app group capabilities must be turned on for your targets.

Let us know if that fixes it!
Thanks!
Michael

same problem. Did you solved yours?

Hey @prazwolsbasnyat,

Are you still facing issues with screen sharing? If so, can you provide the SDK version number you are using so we can trouble shoot together? :slight_smile:

Thanks!
Michael