# Crash In getShareStatus function

**URL:** <https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994>\
**Category:** Video SDK\
**Tags:** ios\
**Created:** [May 20, 2025, 6:22pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994 "2025-05-20T18:22:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [May 20, 2025, 6:22pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/1 "2025-05-20T18:22:57Z")

</div>

Hi @ekaansh.zoom,  
We are currently using the latest ZoomVideoSDK (version 2.2.0) for iOS and have been encountering frequent crashes in the `getShareStatus` function when users attempt to share their screen. In some cases, the app does not crash but fails to provide the screen-sharing feed consistently.

Could you please provide guidance on resolving this issue and ensuring reliable screen-share functionality? The debug log for reference can be found here ( [https://drive.google.com/file/d/1HHTIMYhneqv8rRWu40h8pQjvwHBJ2MUW/view?usp=sharing](https://drive.google.com/file/d/1HHTIMYhneqv8rRWu40h8pQjvwHBJ2MUW/view?usp=sharing)  
).  
We appreciate your prompt response and any steps you can recommend to address this problem.

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [May 22, 2025, 5:35am UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/3 "2025-05-22T05:35:23Z")

</div>

Hi @prw3100,

Please allow me to understand your issues better here. Currently, what type of share (Entire device screen or a single UI View) and how are you doing the share that caused this issue? Also, depending on your use case, the getShareStatus might not be required for the sharer, but it is important for the receiver side under the onUserShareStatusChanged delegate.

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [May 22, 2025, 8:20pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/4 "2025-05-22T20:20:40Z")

</div>

HI @boonjun.tan,  
Thanks for your response. We currently are using single UI view sharing. Every time our view controllers changes, we right away call the .stopShare() function and then call the startShare() function. This way, the right view is being shared. We check if its the sharer in onUserShareStatusChanged function and return right away if it is. Only when it is the receiver do we call the getShareStatus(). We were originally using on version v1.12.0 where we called user?.getShareCanvas() and didn’t run into any issues. Only when ZoomVideoSDKShareAction was introduced did we start noticing problems

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [June 3, 2025, 8:42am UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/5 "2025-06-03T08:42:01Z")

</div>

Hi @prw3100,

Could you also send me a video on this issue as well for investigation?

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [June 9, 2025, 5:51pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/6 "2025-06-09T17:51:45Z")

</div>

Hi @boonjun.tan ,  
You can find the video here [https://drive.google.com/file/d/1vldLcx9s3KXvtfl-TOoPtM3uLjiFlriQ/view?usp=sharing](https://drive.google.com/file/d/1vldLcx9s3KXvtfl-TOoPtM3uLjiFlriQ/view?usp=sharing) . You will see that the ipad on the right side switched screens and its sharing it but the Ipad on the left doesn’t show it

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [June 10, 2025, 4:32pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/7 "2025-06-10T16:32:13Z")

</div>

Hi @prw3100,

Am I understanding the video you shared correctly that the iPad on the right, upon clicking the blue “Start” button, will start sharing the UI view, and the iPad on the left should receive it? However, it is currently showing a black screen instead of the “Touch Screen Tutorial” view.

If yes, upon sharing, did the receivers get the onUserShareStatusChanged for the sharer information and how are you subscribing to the share view based on the information given in the onUserShareStatusChanged delegate? You can also refer to our documentation on this [here](https://developers.zoom.us/docs/video-sdk/ios/share/#8-manage-the-display-of-the-shared-content).

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [June 11, 2025, 5:45pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/8 "2025-06-11T17:45:13Z")

</div>

Hi @boonjun.tan,  
Your understanding is correct. We are getting a black/grey screen instead of the “Touch Screen Tutorial” view.

Upon sharing, the receivers got the onUserShareStatusChanged which not errors. We then do is the following (agrees with the documentation you shared)

DispatchQueue.main.async {  
// Get User’s share canvas.  
if let shareCanvas = shareAction?.getShareCanvas() {

```
            switch shareAction?.getShareStatus() {
            case .start:
                // Set video aspect.
                let videoAspect = ZoomVideoSDKVideoAspect.panAndScan
                // Render the user's share stream.
                let error = shareCanvas.subscribe(with: self.remoteScreenView, aspectMode: videoAspect, andResolution: ._Auto)
                break
            case .stop:
                let error = shareCanvas.unSubscribe(with: self.remoteScreenView)
                break
            default:
                break
            }
        }

```

}

I want to make sure you also know that before we call startShare, we check isSharingOut(), if so, we stopShare and then immediately call startShare. We are mainly having issues during this time. We are forced to do that because we have different views that are being shared before and after

I believe i have gotten to the bottom of the issue, shareAction?.getShareStatus(), gives me ‘.none?’ status instead of ‘.stop’ when i call stopShare function

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [July 2, 2025, 6:38pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/9 "2025-07-02T18:38:24Z")

</div>

Hi @boonjun.tan,  
Any update on this issue?

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [July 3, 2025, 7:30am UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/11 "2025-07-03T07:30:15Z")

</div>

Hi @prw3100,

I have missed this out earlier on and was answering your the other post instead. As with multi share available, are you currently allowing multiple share or only 1 share at the same time? The reason why I am asking this is because there can be a case where user A started sharing and another user B share later on.

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [July 7, 2025, 8:53pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/12 "2025-07-07T20:53:55Z")

</div>

Hi @boonjun.tan,  
For our use case only one user would be sharing at all times

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [July 8, 2025, 1:19am UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/13 "2025-07-08T01:19:26Z")

</div>

@prw3100,

Can you check that your [isMultiShareEnabled](https://marketplacefront.zoom.us/sdk/custom/ios/interface_zoom_video_s_d_k_share_helper.html#ad87dfbca939c9ec476c0de2042354f62) in the ZoomVideoSDKShareHelper is disable? Also, is the subscription done in the main thread? If so, can you also check that whenever a new share is pushed, the older shares are unsubscribed first from the same view before a new share can be pushed.

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [July 8, 2025, 3:52am UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/14 "2025-07-08T03:52:57Z")

</div>

Hi @boonjun.tan,  
We don’t explicitly set `isMultiShareEnabled` to `true`—it only takes that value if it’s the default behavior set by the Zoom SDK. The subscription is performed on the main thread. Before initiating a new share, we always check `.isSharingOut()`. If it returns true, we call `stopShare()` and immediately follow up with `startShare()`. However, we don’t wait for the `onUserShareStatusChanged` callback before calling `startShare()`.

Do you think this might be causing the issue? One of the Zoom developers mentioned during the office hours that it could be related to triggering `startShare()` too soon after calling `stopShare()`.

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [July 8, 2025, 7:47am UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/15 "2025-07-08T07:47:29Z")

</div>

Hi @prw3100,

Yes, this will cause an issue. Once the stop share is called, Zoom has some internal process running, and the only time that the share has truly stopped entirely will be based on the onUserShareStatusChanged’s callback stop status. Please try this way instead.

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [July 9, 2025, 8:27pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/16 "2025-07-09T20:27:18Z")

</div>

Hi @boonjun.tan ,  
I tried that way and the issue is still there. The `ZoomVideoSDK.shareInstance()?.getShareHelper().stopShare()` still gives me `.none` status inside the `func onUserShareStatusChanged(_ helper: ZoomVideoSDKShareHelper?, user: ZoomVideoSDKUser?, shareAction: ZoomVideoSDKShareAction?)` function

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [July 17, 2025, 9:36am UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/17 "2025-07-17T09:36:19Z")

</div>

Hi @prw3100,

What is this .none status that you mentioned here? Did the stopShare gives an error code of 0 (success) when you execute that method and also once that is executed successfully, all the participants within the session will get the onUserShareStatusChanged of the user with its ShareCanvas’s shareStatus to be ZoomVideoSDKReceiveSharingStatus\_Stop. Hence once you get this callback, you can then proceed to turn on share if you will like to. Or you can get also check the share status of the user by using the user object and getShareActionList.

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [July 17, 2025, 11:20pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/18 "2025-07-17T23:20:10Z")

</div>

Hi @boonjun.tan,  
Its the ZoomVideoSDKReceiveSharingStatus\_None. When you stop sharing, all users get the onUserShareStatusChanged callback but instead of ZoomVideoSDKReceiveSharingStatus\_Stop status they get ZoomVideoSDKReceiveSharingStatus\_None

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [July 22, 2025, 1:35am UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/19 "2025-07-22T01:35:41Z")

</div>

Hi @prw3100,

That shouldn’t be the case. Can you send me the new Zoom’s log via the new way that I mentioned and also code snippets of your current project on how you are screen sharing (Broadcast Extension or View) and also your onUserShareStatusChanged callback.

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [July 24, 2025, 10:08pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/20 "2025-07-24T22:08:53Z")

</div>

Hi @boonjun.tan,  
You were absolutely right—`shareStatus` was indeed providing the correct status. After further investigation, we discovered that the actual issue lies in the thread safety of `shareAction?.getShareStatus()`.  
The `shareAction` parameter is passed into the `onUserShareStatusChanged()` delegate callback. When we retrieve `shareStatus` directly from the background thread where the callback is invoked, we get the expected result. However, when we attempt the same call within a `DispatchQueue.main.async` block, the status unexpectedly returns as `.none`.  
This behavior strongly suggests that `getShareStatus()` is not thread-safe. Interestingly, we didn’t encounter this issue in previous SDK versions.  
Could you confirm whether this is expected behavior? And if not, is there a plan to address this in an upcoming ZoomVideoSDK release?

---

<div class="post-metadata">

**Author:** ![prw3100](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prw3100](https://devforum.zoom.us/u/prw3100)\
**Post date:** [August 4, 2025, 5:58pm UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/21 "2025-08-04T17:58:12Z")

</div>

Hi @boonjun.tan,

Any update on this?

---

<div class="post-metadata">

**Author:** ![boonjun.tan](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/boonjun.tan/32/38306_2.png) [@boonjun.tan](https://devforum.zoom.us/u/boonjun.tan)\
**Post date:** [September 4, 2025, 3:31am UTC](https://devforum.zoom.us/t/crash-in-getsharestatus-function/132994/22 "2025-09-04T03:31:07Z")

</div>

Hi @prw3100,

Can you please share the entire code where you are handling the background/main thread because all our SDK related method should be called in the main thread. Are you having a background thread within onUserShareStatusChanged to handle the shareAction right now?
