# AVCaptureSession startRunning Main Thread Checker: UI API called on a background thread

**URL:** <https://devforum.zoom.us/t/avcapturesession-startrunning-main-thread-checker-ui-api-called-on-a-background-thread/109880>\
**Category:** iOS\
**Tags:** ios\
**Created:** [May 14, 2024, 3:46am UTC](https://devforum.zoom.us/t/avcapturesession-startrunning-main-thread-checker-ui-api-called-on-a-background-thread/109880 "2024-05-14T03:46:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![max.tran](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/max.tran/32/58046_2.png) [@max.tran](https://devforum.zoom.us/u/max.tran)\
**Post date:** [May 14, 2024, 3:46am UTC](https://devforum.zoom.us/t/avcapturesession-startrunning-main-thread-checker-ui-api-called-on-a-background-thread/109880/1 "2024-05-14T03:46:01Z")

</div>

**Description**

1. iOS start share . Console log " \*\*Thread Performance Checker: -[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness  
\*\*

**Which version?**  
Zoom Video SDK 1.11.2 Latest

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. Open App
2. Start / Stop camera

**Screenshots**

 ![Screenshot 2024-05-14 at 10.44.00 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/9/c/9c7659d3cc9f2bdae6b032e1dd907b43ed801acc.png)

---

<div class="post-metadata">

**Author:** ![dina2](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dina2/32/58988_2.png) [@dina2](https://devforum.zoom.us/u/dina2)\
**Post date:** [May 15, 2024, 1:56pm UTC](https://devforum.zoom.us/t/avcapturesession-startrunning-main-thread-checker-ui-api-called-on-a-background-thread/109880/2 "2024-05-15T13:56:11Z")

</div>

Yeah same problem here, calling videoHelper.switchCamera(), videoHelper.startVideoCanvasPreview or videoHelper.startVideo() gives you a thread issue.

For example if you call videoHelper.startVideoCanvasPreview on the main tread you get the error “-[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness”

if you call it on a background thread you get this “-[UIView bounds] must be used from main thread only”

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [June 14, 2024, 11:56pm UTC](https://devforum.zoom.us/t/avcapturesession-startrunning-main-thread-checker-ui-api-called-on-a-background-thread/109880/3 "2024-06-14T23:56:50Z")

</div>

Closed on June 14, 2024, 11:56pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
