# Screen Sharing button not working

**URL:** <https://devforum.zoom.us/t/screen-sharing-button-not-working/18174>\
**Category:** iOS\
**Created:** [May 18, 2020, 4:36pm UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174 "2020-05-18T16:36:53Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob.gomez.mu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rob.gomez.mu/32/8359_2.png) [@rob.gomez.mu](https://devforum.zoom.us/u/rob.gomez.mu)\
**Post date:** [May 18, 2020, 4:36pm UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/1 "2020-05-18T16:36:53Z")

</div>

I’m trying to share my screen following documentation steps, but I have a problem. I can’t share my screen.

onClickShareScreen function is called and in this function I call to MobileRTC.shared().getMeetingService().startAppShare(), but then nothing happens. I think I did something bad, because this step isn’t occur: “The SDK should notify your app using the `(void)onSinkMeetingActiveShare:(NSUInteger)userID` instance with the user ID who started the screen share.”

Can you help me, please?

Thanks in advance,

Roberto

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 19, 2020, 8:53am UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/2 "2020-05-19T08:53:01Z")

</div>

Hi Roberto,

Thanks for the post. Which doc are you referring to? If you follow the doc here:[https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share](https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share), you will need to create a broadcast extension, and then invoke the screen recording feature in the system for screen sharing.

Please have a try. Thanks!

---

<div class="post-metadata">

**Author:** ![rob.gomez.mu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rob.gomez.mu/32/8359_2.png) [@rob.gomez.mu](https://devforum.zoom.us/u/rob.gomez.mu)\
**Post date:** [May 19, 2020, 8:59am UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/3 "2020-05-19T08:59:35Z")

</div>

Thanks for the answer @carson.zoom,

I created a broadcast extension, defined group, set onClickShareScreen function:

```
func onClickShareScreen(_ parentVC: UIViewController) {
        guard let service = MobileRTC.shared().getMeetingService() else { return }
        
        if service.isStartingShare() {
            service.stopAppShare()
        } else {
            service.startAppShare()
        }
    }

```

but then… **func** onSinkMeetingActiveShare( **\_** userID: UInt) isn’t been called.

I don’t know If I need to do some step after “startAppShare()”, but It isn’t working.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 20, 2020, 7:40am UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/4 "2020-05-20T07:40:50Z")

</div>

Hi @rob.gomez.mu,

Thanks for the reply. Actually the startAppShare and stopAppShare is for the appShareWithView interface(We have another method to share screen but we do recommend using the broadcast extension). The broadcast extension is rely on Apple’s services so you may use something like [https://developer.apple.com/documentation/replaykit/rpsystembroadcastpickerview?language=objc](https://developer.apple.com/documentation/replaykit/rpsystembroadcastpickerview?language=objc) to invoke the screen sharing. Or you could manually start the screen recording by following the instruction here: [https://support.zoom.us/hc/en-us/articles/115005890803-iOS-Screen-Sharing](https://support.zoom.us/hc/en-us/articles/115005890803-iOS-Screen-Sharing)

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![rob.gomez.mu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rob.gomez.mu/32/8359_2.png) [@rob.gomez.mu](https://devforum.zoom.us/u/rob.gomez.mu)\
**Post date:** [May 21, 2020, 2:33pm UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/5 "2020-05-21T14:33:56Z")

</div>

I didn’t see any real solution, Do you have any complete share screen example to show? Because I think that documentation isn’t clear ☹

---

<div class="post-metadata">

**Author:** ![heartquake](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/heartquake/32/3639_2.png) [@heartquake](https://devforum.zoom.us/u/heartquake)\
**Post date:** [May 21, 2020, 3:43pm UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/6 "2020-05-21T15:43:10Z")

</div>

I’ve been trying screen share for weeks and still not able to broadcast. A real sample would be really helpful.

---

<div class="post-metadata">

**Author:** ![rob.gomez.mu](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rob.gomez.mu/32/8359_2.png) [@rob.gomez.mu](https://devforum.zoom.us/u/rob.gomez.mu)\
**Post date:** [May 21, 2020, 3:58pm UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/7 "2020-05-21T15:58:24Z")

</div>

@carson.zoom my ‘onClickShareScreen’ function is:

> func onClickShareScreen(\_ parentVC: UIViewController) {  
> guard let service = MobileRTC.shared().getMeetingService() else { return }
> 
> ```
> if service.isStartingShare() {
> service.stopAppShare()
> } else {
> service.startAppShare()
>         
> let broadcastPicker = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width/2, height: UIScreen.main.bounds.size.height/2))
> broadcastPicker.preferredExtension = "MyExtension"
> 
> parentVC.view.addSubview(broadcastPicker)
> parentVC.view.bringSubviewToFront(broadcastPicker)
> }
> }
> 
> ```

Is it correct?

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 23, 2020, 4:38am UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/8 "2020-05-23T04:38:47Z")

</div>

Hi @rob.gomez.mu,

If you are using the broadcast extension to do screen sharing, you do not need the `startAppShare` and the `stopAppShare`. You could simply implement the broadcast picker in the onClickShareScreen method like the following:

```auto
- (void)onClickShareScreen:(UIViewController *)parentVC
{
     if (@available(iOS 12.0, *)) {
         RPSystemBroadcastPickerView *broadcastView = [[RPSystemBroadcastPickerView alloc] init];
            broadcastView.preferredExtension = @"Extension bundle ID";
            broadcastView.tag = "NSInteger here";
            
            [self.mainVC.view addSubview:broadcastView];
         
         broadcastView = [self.mainVC.view viewWithTag:"NSInteger here"];
         if (!broadcastView) return;

         for (UIView *subView in broadcastView.subviews) {
             if ([subView isKindOfClass:[UIButton class]])
             {
                 UIButton *broadcastBtn = (UIButton *)subView;
                 [broadcastBtn sendActionsForControlEvents:UIControlEventAllTouchEvents];
                 break;
             }
         }
     }
}

```

Then you could trigger the picker by pressing the share button.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![arsallion313](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@arsallion313](https://devforum.zoom.us/u/arsallion313)\
**Post date:** [July 17, 2020, 12:28pm UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/9 "2020-07-17T12:28:06Z")

</div>

hi @carson.zoom  
how we can broadcast share screen if i am using custom meeting ui

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 1, 2020, 5:26am UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/10 "2020-08-01T05:26:23Z")

</div>

Hi @arsallion313,

Thanks for the reply. For Custom UI, it will be the same way as how it is implemented in the Zoom default UI.

Thanks!

---

<div class="post-metadata">

**Author:** ![sandy.rishi573](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sandy.rishi573/32/33780_2.png) [@sandy.rishi573](https://devforum.zoom.us/u/sandy.rishi573)\
**Post date:** [February 24, 2022, 12:33pm UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/11 "2022-02-24T12:33:50Z")

</div>

Hello  
i am trying to enable screen share to default zoom ui is it possible add share button?

when i click on share content button after meeting is joined it just shows me two button tiles for “photos and website url”

i have followed steps mentioned here [Screen sharing](https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/screen-share/)

i have also added MobileRTCMeetingShareActionItemDelegate to my view controller

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [February 25, 2022, 12:40am UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/12 "2022-02-25T00:40:07Z")

</div>

Hi @sandy.rishi573, thanks for using the dev forum.

Are you trying to share via ReplayKit as outlined in our documentation? If so, there are several steps outlined in our documentation to enable this, so it is impossible to tell what exactly is going wrong in your implementation without more specific information. Have you looked at the [troubleshooting page](https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/screen-share/ios-screen-share-trouble-tips) yet?

Thanks!

---

<div class="post-metadata">

**Author:** ![sandy.rishi573](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sandy.rishi573/32/33780_2.png) [@sandy.rishi573](https://devforum.zoom.us/u/sandy.rishi573)\
**Post date:** [February 26, 2022, 5:27am UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/13 "2022-02-26T05:27:49Z")

</div>

yes i am trying to share via ReplayKit as mentioned in `(https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/screen-share/)`.

after a few try’s based on that troubleshooting doc i was able to get that share button but when i try to share my screen in a meeting i am getting a new error

error Popup  
Screen Broadcasting - live broadcast to zoom has stopped due to : Connection failed, restart broadcasting to zoom for screen sharing …

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [February 28, 2022, 5:42pm UTC](https://devforum.zoom.us/t/screen-sharing-button-not-working/18174/14 "2022-02-28T17:42:53Z")

</div>

Hi @sandy.rishi573,

Can you please let me know specifically what changes have been made based on the troubleshooting documentation?

Thanks!
