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:
- (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!