# Zoom Custom UI ans screen sharing IOS swift

**URL:** <https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085>\
**Category:** iOS\
**Created:** [June 3, 2020, 8:47am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085 "2020-06-03T08:47:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 3, 2020, 8:47am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/1 "2020-06-03T08:47:18Z")

</div>

**Description**  
Hi,  
I am working on zoom iOS swift. I need help with zoom custom meeting swift code. We have already integrated start ans join meeting. Now we want custom meeting ui and share screen functionality.  
can anyone help with that?  
I am trying to convert objective c code to swift. But I am getting so many errors.  
It will be helpful if you can provide swift code for custom meeting.

**Which version?**  
Latest 4.6

**Smartphone (please complete the following information):**

- Device: All
- OS: Above 11.0

**Additional context**  
I am trying to convert objective c code to swift. But I am getting so many errors. It will be helpful if you can provide swift code for custom meeting.

---

<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:** [June 3, 2020, 10:35am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/2 "2020-06-03T10:35:12Z")

</div>

Hi @eldhose.m,

Thanks for the post. Could you provide the errors you are getting? Are you using [v4.6.21666.0428](https://github.com/zoom/zoom-sdk-ios/commit/8543b5e2ed53f574710fcf0a622f52d84857f0c3)?

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 3, 2020, 1:34pm UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/3 "2020-06-03T13:34:17Z")

</div>

We have a controller named ‘PresentationVC’. We need start custom meeting when I tap a button on this ViewController.

guard let ms = MobileRTC.shared().getMeetingSettings() else {return}  
ms.enableCustomMeeting = true  
MobileRTC.shared().getMeetingService()?.customizedUImeetingDelegate = self  
ZoomService.sharedInstance.startMeeting(password: “”)

This is the code I am using to start custom meeting.

extension PresentationVC : MobileRTCCustomizedUIMeetingDelegate {  
func onInitMeetingView() {  
print("PresentationVC onInitMeetingView ")  
let vc = CustomMeetingViewController()  
// self.customMeetingVC = vc  
addChild(vc)  
vc.view.frame = self.view.bounds  
view.addSubview(vc.view)  
vc.didMove(toParent: self)  
}

```
func onDestroyMeetingView() {
    print("PresentationVC onInitMeetingView ")
}

```

}

If I use only below code, normal meeting will start. We want custom meeting.  
ZoomService.sharedInstance.startMeeting(password: “”)

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 4, 2020, 9:31am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/4 "2020-06-04T09:31:45Z")

</div>

hi @carson.zoom,

if ms?.isStartingShare != nil {  
print(“startOrStopAppShare if – (ms)”)  
ms?.stopAppShare()  
} else {  
print(“startOrStopAppShare else – (ms)”)  
ms?.startAppShare()  
}

I cannot start sharing because of this. Always it goes to ‘if’ condition.

---

<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:** [June 6, 2020, 12:36am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/5 "2020-06-06T00:36:58Z")

</div>

Hi @eldhose.m,

Thanks for the reply. For the screen sharing, please follow the instruction here to implement the screen sharing feature.: [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).

And regarding the start meeting implementation, you may refer to the implementation in our demo app: [https://github.com/zoom/zoom-sdk-ios/tree/master/MobileRTCSample/MobileRTCSample;](https://github.com/zoom/zoom-sdk-ios/tree/master/MobileRTCSample/MobileRTCSample;) Here is a sitemap for the demo app: [https://github.com/zoom/zoom-sdk-ios#navigating-sdk-sample-files](https://github.com/zoom/zoom-sdk-ios#navigating-sdk-sample-files)

Thanks!

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 8, 2020, 12:06pm UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/6 "2020-06-08T12:06:28Z")

</div>

Hi we integrated screen share also.

Mobile video’s audio is not working. (eg: YouTube video sound for the participants)  
Also how can I start more than one meeting at a time?

---

<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:** [June 9, 2020, 6:39am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/7 "2020-06-09T06:39:16Z")

</div>

Hi @eldhose.m,

Thanks for the reply. If the first button in the following screenshot on?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/f/fad58a683d33cc1e4cac9f652cfe5cb4d3af8568.png)

The Share Device audio function needs to turn on in order to share audio.

Start multiple meetings using the same SDK is not supported.

Thanks!

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 9, 2020, 8:48am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/8 "2020-06-09T08:48:50Z")

</div>

This screen is not visible after starting broadcast. Screen share is working. But this screen is not coming.

We also checked on your objective c demo code. Broadcasting is not working on the demo.  
Can you help us for enabling device audio? Objective c or swift code for this?

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 9, 2020, 9:41am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/9 "2020-06-09T09:41:04Z")

</div>

@carson.zoom When we tap on share screen, broadcasting screen is appearing to start screen share. But after dismissing that by tapping the screen again, above screen is not visible. We can see on video screen. Is there a way to see this screen after starting broadcast?

How can I enable that screen? Is there any function to enable 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:** [June 12, 2020, 8:35am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/10 "2020-06-12T08:35:54Z")

</div>

The broadcasting extension in our demo app is only for demo purpose, you will need to create your own broadcast extension in order to make it work(Xcode does not recognize the broadcast extension we created for you).

Once you follow the instruction [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) to implement the screen share feature, you will see the screen I mentioned above. You may press on the “Share Device Audio” to enable audio sharing.

If you are broadcasting other screens and want to see the screen that has the “Share Device Audio” button, you could go back to your SDK app and it will show up.

Thanks!

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 12, 2020, 11:27am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/11 "2020-06-12T11:27:14Z")

</div>

We followed the instruction [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) to implement the screen share feature. Still above mentioned screen is not showing up.

Broadcasting is working fine. Attached screenshot for your reference. After this screen showed up i can start and stop screensharing.

But after dismissing that view i cannot see ‘share device audio’ screen.

Do i need to enable thai in code? It is not getting enabled. Please help

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 12, 2020, 11:27am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/12 "2020-06-12T11:27:04Z")

</div>

We followed the instruction [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) to implement the screen share feature. Still above mentioned screen is not showing up.

Broadcasting is working fine. Attached screenshot for your reference. After this screen showed up i can start and stop screensharing.

But after dismissing that view i cannot see ‘share device audio’ screen.

Do i need to enable thai in code? It is not getting enabled. Please help

Thanks.

 ![Screenshot 2020-06-12 at 4.51.47 PM.jpg](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/5/59f61d22f969b3f1bc3f3dced84b9bb8355a6608.jpeg)

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 12, 2020, 3:19pm UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/13 "2020-06-12T15:19:32Z")

</div>

@carson.zoom  
we have implemented this below method

- (void)onClickShareScreen:(UIViewController\*)parentVC;

But it is not getting called.  
Also we added ’ MobileRTC.shared().getMeetingService()?.delegate = self’

Still ‘onClickShareScreen’ not getting called.

When we tap on ‘sharebutton’ on bottom panel, what will be the code to get screen share working?  
we are using custom meeting.  
Now we are calling ‘sharePresenter?.startOrStopAppShare()’ this.  
func startOrStopAppShare() {  
let ms = MobileRTC.shared().getMeetingService()  
if ms != nil {  
if ((ms?.isStartingShare())!){  
print(“startOrStopAppShare if – (ms)”)  
ms?.stopAppShare()  
} else {  
print(“startOrStopAppShare else – (ms)”)  
ms?.startAppShare()  
}  
}  
}

Using this we can only share app screen. We need broadcasting and device audio. Please suggest any solution

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 12, 2020, 3:21pm UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/14 "2020-06-12T15:21:09Z")

</div>

we have implemented this below method

- (void)onClickShareScreen:(UIViewController\*)parentVC;

But it is not getting called.  
Also we added ’ MobileRTC.shared().getMeetingService()?.delegate = self’

Still ‘onClickShareScreen’ not getting called.

When we tap on ‘sharebutton’ on bottom panel, what will be the code to get screen share working?  
we are using custom meeting.  
Now we are calling ‘sharePresenter?.startOrStopAppShare()’ this.  
func startOrStopAppShare() {  
let ms = MobileRTC.shared().getMeetingService()  
if ms != nil {  
if ((ms?.isStartingShare())!){  
print(“startOrStopAppShare if – (ms)”)  
ms?.stopAppShare()  
} else {  
print(“startOrStopAppShare else – (ms)”)  
ms?.startAppShare()  
}  
}  
}

Using this we can only share app screen. We need broadcasting and device audio. Please suggest any solution

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 15, 2020, 8:45am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/15 "2020-06-15T08:45:16Z")

</div>

@carson.zoom

**Description**  
We have integrated screen sharing but the audio of videos played on the device from which screen is shared is not audible to other participants. The audio via mic is audible. We are using custom UI.  
**Which version?**  
mobileRTCVersion - 4.6.21666.0428  
**Screenshots**

 ![IMG_0785 copy](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/d/dc205289f70546cc72297c1dd444f3c5e4e5f2f4.png)  
When we start broadcasting this particular UI doesn’t appear in our custom UI. Which method is called to toggle Share Device Audio. Please refer to the screenshot.  
**Smartphone (please complete the following information):**

- Device: iPhone 6 plus–Software version- 12.4.6 / iPhone 11–Software version- 13.3.1  
**Additional context**  
Is there any way we can toggle the Share Device Audio programmatically in our own custom UI.

We are using below code to start broadcast:  
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.fastforward.app.infiny.screenshare”  
let buttonPressed = NSSelectorFromString(“buttonPressed:”)  
if broadcastView.responds(to: buttonPressed) {  
[//broadcastView.perform](https://broadcastView.perform)(buttonPressed, with: nil)  
for subview in broadcastView.subviews {  
print(“broadcastView.subviews”,broadcastView.subviews)  
if let button = subview as? UIButton {  
button.sendActions(for: UIControl.Event.allTouchEvents)  
}  
}  
} else {  
// Fallback on earlier versions  
}  
}

Please reply asap.

---

<div class="post-metadata">

**Author:** ![eldhose.m](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@eldhose.m](https://devforum.zoom.us/u/eldhose.m)\
**Post date:** [June 16, 2020, 6:23am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/16 "2020-06-16T06:23:18Z")

</div>

Hi,

It has been 4 days since we sent the above query. Can you please provide objective-c or swift code for share screen functionality in custom meeting in ios.

We have implemented screen sharing using below code:

**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.fastforward.app.infiny.screenshare”

**let** buttonPressed = NSSelectorFromString(“buttonPressed:”)

**if** broadcastView.responds(to: buttonPressed) {

[//broadcastView.perform](https://broadcastView.perform)(buttonPressed, with: nil)

**for** subview **in** broadcastView.subviews {

print(“broadcastView.subviews”,broadcastView.subviews)

**if**  **let** button = subview **as**? UIButton {

button.sendActions(for: UIControl.Event.allTouchEvents)

}

}

} **else** {

// Fallback on earlier versions

}

}

But device audio is not getting shared. It will be helpful if you can share objective-c or swift code for share screen functionality in custom meeting in ios.

thanks

---

<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:** [June 17, 2020, 5:33am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/17 "2020-06-17T05:33:23Z")

</div>

Hi @eldhose.m,

Thanks for the reply and the follow-up. Pardon the late response due to high demands on support and the limited bandwidth here. Based on the code snippet, it seems like you are using Custom UI. The audio share interface is currently not available in the Custom UI. I have forwarded this as a feature request to the engineering team.

Thanks!

---

<div class="post-metadata">

**Author:** ![alexander.j](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexander.j/32/4137_2.png) [@alexander.j](https://devforum.zoom.us/u/alexander.j)\
**Post date:** [June 17, 2020, 6:39am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/18 "2020-06-17T06:39:18Z")

</div>

Hi @carson.zoom,  
When we had first enquired about this issue on June 6th and the response from your side was positive stating it should work. We have since then continued development for the custom UI for the Zoom meeting and this audio share is the last task pending. Is there any way we can implement this feature ourselves programmatically without the default interface if not by when can we expect this feature?. We are required to complete this project by the end of this week. I request you to provide further support for this issue. It will be helpful if you can provide a solution to this feature by the end of this week.

---

<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:** [June 20, 2020, 2:12am UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/19 "2020-06-20T02:12:18Z")

</div>

Hi @alexander.j,

Thanks for the reply. Pardon the confusion and inconvenience here. The screenshot and the “audio share working” reply was for the Zoom default UI. It is unfortunate that this interface is currently not available on Custom UI. I have submitted a feature request to the engineering team for this interface but it will take some time to develop. I could keep you updated.

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:10pm UTC](https://devforum.zoom.us/t/zoom-custom-ui-ans-screen-sharing-ios-swift/20085/20 "2020-08-21T22:10:54Z")

</div>

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


