startAppShare returns false

#1

Description
I’ve followed all the documents. The ‘Screen’ option is in the Share menu. But after I call the startAppShare() method, it returns false and nothing happens. Here is my code in swift:

func onClickShareScreen(_ parentVC: UIViewController!) {
let ms = MobileRTC.shared()?.getMeetingService()
if ms != nil {
if (ms?.isStartingShare())! {
ms?.stopAppShare()
print(“Stop Screen Sharing”)
}
else {
ms?.startAppShare()
print(“Start Screen Sharing”)
}
}
}
Any idea how to solve it?

Which version?
latest version

Smartphone (please complete the following information):

  • Device: iPhone7
  • OS: IOS12.2
0 Likes

#2

Hi yuhan,
Thanks for using Zoom SDK. Are you following the instructions this doc:https://marketplace.zoom.us/docs/sdk/native-sdks/iOS/mastering-zoom-sdk/in-meeting-function/zoom-meeting-ui/screen-share? Have you configured the iOS broadcasting feature as mentioned in https://support.zoom.us/hc/en-us/articles/115005890803-iOS-Screen-Sharing? Due to the screen sharing constraints from Apple, if you would like to do screen sharing, you need to use the iOS broadcasting feature and start the screen sharing from there.

Let me know if this is not the case or if you have any other questions. Thanks!

0 Likes

#3

Yep, I followed the documents step by step. I didn’t see my app after I pressed Record icon. Please check my code to see if I done something wrong on implementing the onClickShareScreen method. Because I couldn’t find any information for this part in your documents.

0 Likes

#4

Hi,
Thanks for the reply.

  1. If you didn’t see your app after pressing the Record icon, you might need to double check your app group configuration.
  2. The onClickShareScreen method is just helping you to show the Share button in the meeting UI. It won’t affect the screen sharing feature. You don’t actually need the parts in your code snippet to do screen sharing. As long as your meeting is on and live, by using the iOS broadcasting feature, the screen sharing feature will be triggered automatically. (If you configured correctly)

Hope the above info helps. Let me know if you have any other questions. Thanks!

0 Likes

#5

Problem solved! Thanks for your help!

0 Likes

#6

One more question here: How to navigate back to my original view controller after I start the screen share?

0 Likes

#7

Hi,
Glad to hear that the problem was resolved. Once you start the screen sharing, there should be a button called “Stop share”, by pressing that, the screen sharing will stop and bring you back to your original view controller. If you would like to present your original view controller while screen sharing, you can use methods like presentViewController or pushViewController to present your view.

Hope this helps. Thanks!

0 Likes