# Zoom screen share not working with custom UI in iOS

**URL:** <https://devforum.zoom.us/t/zoom-screen-share-not-working-with-custom-ui-in-ios/22650>\
**Category:** iOS\
**Created:** [June 29, 2020, 12:34pm UTC](https://devforum.zoom.us/t/zoom-screen-share-not-working-with-custom-ui-in-ios/22650 "2020-06-29T12:34:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![santoshkmrpappu](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@santoshkmrpappu](https://devforum.zoom.us/u/santoshkmrpappu)\
**Post date:** [June 29, 2020, 12:34pm UTC](https://devforum.zoom.us/t/zoom-screen-share-not-working-with-custom-ui-in-ios/22650/1 "2020-06-29T12:34:00Z")

</div>

Zoom custom share is working with default zoom UI but not working with custom UI(enable custom UI in setting ) in sample code,i follow the bleow link

1.[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)  
2.[https://support.zoom.us/hc/en-us/articles/115005890803-iOS-Screen-Sharing](https://support.zoom.us/hc/en-us/articles/115005890803-iOS-Screen-Sharing)

I am trying by calling API ‘startOrStopAppShare’ when user clicks the share button in our app’s UI.  
I am using API ‘[[MobileRTC sharedRTC] getMeetingSettings].enableCustomMeeting = YES;’ to enable zoom custom UI.  
Callback ‘onClickedShareButton:(UIViewController\*)parentVC addShareActionItem:(NSMutableArray \*)array’ is successfully called on starting share with custom UI disable but not called when custom UI is enabled.  
I am also using below code inside ‘onClickedShareButton’ callback function  
MobileRTCMeetingShareActionItem \* item = [[MobileRTCMeetingShareActionItem itemWithTitle:@“Demo share” Tag:1] autorelease];  
item.delegate = self;  
[array addObject:item];  
return NO;  
but this code only work with default UI share button  
share UI in custon Zoom UI(enabled custon UI )

 ![processed34](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/9/9be6f6742d517d57adcda8d630fbd541add95be3.jpeg)

---

<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:** [July 3, 2020, 5:28am UTC](https://devforum.zoom.us/t/zoom-screen-share-not-working-with-custom-ui-in-ios/22650/2 "2020-07-03T05:28:54Z")

</div>

Hi @santoshkmrpappu,

Thanks for using Zoom SDK. The callback `- (BOOL)onClickedShareButton:(UIViewController * _Nonnull)parentVC addShareActionItem:(NSMutableArray * _Nonnull)array; ` is a callback that allows you to define and to customize the action when you press the “Share” button, it is not binding with the actual screen sharing action.

The instruction you are mentioning shows the steps of how to implement the screen sharing feature using the broadcast extension. If you have followed the steps and develop the extension, and you have implemented the `onClickedShareButton` callback, the only thing that is missing is calling the iOS interface to trigger the screen recording. You may use something like [https://developer.apple.com/documentation/replaykit/rpsystembroadcastpickerview?language=objc](https://developer.apple.com/documentation/replaykit/rpsystembroadcastpickerview?language=objc) to trigger the screen broadcasting feature.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![santoshkmrpappu](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@santoshkmrpappu](https://devforum.zoom.us/u/santoshkmrpappu)\
**Post date:** [July 8, 2020, 12:28pm UTC](https://devforum.zoom.us/t/zoom-screen-share-not-working-with-custom-ui-in-ios/22650/3 "2020-07-08T12:28:46Z")

</div>

Hi @carson.zoom,  
Thank you, I follow your instruction and got the solution, I’m using Below code indide share button click listener

```
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;
             }
         }
     }

```

and I’m getting on my device is this

 ![IMG_0062.PNG](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/f/fab63d7b36c6ed745ae1ce69e2cc5bec09ebb544.jpeg)  
and it is working fine.  
but i wanted below type popup also on share button click.  
 ![share-screen-options-2](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/d/d43ce3ccdbb600540817982e972ecb685ef24548.png)  
so, what is the code for this and what to do for this.

---

<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:** [July 11, 2020, 12:58am UTC](https://devforum.zoom.us/t/zoom-screen-share-not-working-with-custom-ui-in-ios/22650/4 "2020-07-11T00:58:14Z")

</div>

Hi @santoshkmrpappu,

Glad to see that you have successfully implemented the screen sharing feature. In order to show the “Screen” button, you will need to implement the callback

```auto
/*!
 @brief Callback event that user clicks the sharing screen.
 @param parentVC Parent viewcontroller to present the view of Sharing Screen Usage Guide.
 @waring Application will present Share Screen Usage Guide.
 */
- (void)onClickShareScreen:(UIViewController*)parentVC;

```

Step 7 in [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). Implement this callback will show the “Share” button, all you need to do is to trigger the Broadcast Picker in this callback then the screen sharing will work when you press the “Share” button.

Thanks!

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 10:39pm UTC](https://devforum.zoom.us/t/zoom-screen-share-not-working-with-custom-ui-in-ios/22650/5 "2020-08-21T22:39:47Z")

</div>

Closed on August 21, 2020, 10:39pm UTC


