Zoom screen share not working with custom UI in iOS

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


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 )

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 to trigger the screen broadcasting feature.

Hope this helps. Thanks!

Hi @Carson_Chen,
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];

and I’m getting on my device is this

and it is working fine.
but i wanted below type popup also on share button click.

so, what is the code for this and what to do for this.

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

 @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. 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.