# Microphone keeps turning on and off iOS

**URL:** <https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625>\
**Category:** Twilio Migration\
**Tags:** ios\
**Created:** [February 27, 2024, 3:26pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625 "2024-02-27T15:26:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelpetersen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michaelpetersen/32/49650_2.png) [@michaelpetersen](https://devforum.zoom.us/u/michaelpetersen)\
**Post date:** [February 27, 2024, 3:26pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/1 "2024-02-27T15:26:56Z")

</div>

**Video SDK Type and Version**  
We are using the Zoom iOS Video SDK version 1.10.5

**Description**  
We just migrated from Twilio where we never had any problems.

After connecting to a call, the microphone turns of, and after a few seconds back on. This keeps happening every few seconds.  
If we manually toggle the microphone, it starts to toggle even faster.

**Error?**  
The zoom SDK doesn’t seem to give any reliable callbacks. but CallKit gives a callback in

```auto
provider(_ provider: CXProvider, perform action: CXSetMutedCallAction)

```

---

<div class="post-metadata">

**Author:** ![richard.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/richard.zoom/32/41061_2.png) [@richard.zoom](https://devforum.zoom.us/u/richard.zoom)\
**Post date:** [February 28, 2024, 7:35pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/2 "2024-02-28T19:35:32Z")

</div>

Hello Michael,

Can you please set `enableLog` to true in `ZoomVideoSDKInitParams()` and provide logs as per the [initialization instructions](https://developers.zoom.us/docs/video-sdk/ios/integrate/#initialize-with-debug-log)? [This guide](https://developers.zoom.us/blog/vsdk-log-retrieval-instructions/#ios) might also be of help.

Thank you for your patience,  
Richard

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 1, 2024, 8:33pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/3 "2024-03-01T20:33:40Z")

</div>

Hey @michaelpetersen ,

Can you please share steps to reproduce the issue, including your code?

Have you checked if there is any loop that may be triggering this?

Best,  
Tommy

---

<div class="post-metadata">

**Author:** ![michaelpetersen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michaelpetersen/32/49650_2.png) [@michaelpetersen](https://devforum.zoom.us/u/michaelpetersen)\
**Post date:** [March 2, 2024, 5:21pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/4 "2024-03-02T17:21:35Z")

</div>

Hi @tommy ,  
Thanks for your reply.

I don’t know what you mean about steps. It happens every time I start a call.

I can’t find any loops or anything. It’s also odd. If I manually toggle mute, I get a callback from your SDK, but not when it automatically toggles.

To create the context I do

```auto
        let initParams = ZoomVideoSDKInitParams()
        initParams.domain = "zoom.us"
        #if DEBUG
        initParams.enableLog = true
        #endif
        
        let sdkInitReturnStatus = ZoomVideoSDK.shareInstance()?.initialize(initParams)

```

To connect to a call I do the following:

```auto
        let sessionContext = ZoomVideoSDKSessionContext()
        sessionContext.sessionName = roomId
        sessionContext.token = accessToken
        sessionContext.userName = userName
        sessionContext.audioOption?.connect = true
        sessionContext.videoOption?.localVideoOn = true
        sessionContext.virtualAudioMicDelegate = self
        
        let res = getShareInstance()?.joinSession(sessionContext) {

```

Is this enough? I otherwise have to check if I am allowed to send you the full code.

---

<div class="post-metadata">

**Author:** ![michaelpetersen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michaelpetersen/32/49650_2.png) [@michaelpetersen](https://devforum.zoom.us/u/michaelpetersen)\
**Post date:** [March 2, 2024, 5:22pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/5 "2024-03-02T17:22:26Z")

</div>

Hi @richard.zoom  
Thanks for your reply.

I don’t seem to be able to upload the log file to the dev forum?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 6, 2024, 12:14am UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/6 "2024-03-06T00:14:50Z")

</div>

Hey @michaelpetersen , I have DM’d you so you can send it to me privately.

Best,  
Tommy

---

<div class="post-metadata">

**Author:** ![richard.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/richard.zoom/32/41061_2.png) [@richard.zoom](https://devforum.zoom.us/u/richard.zoom)\
**Post date:** [March 6, 2024, 12:25am UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/7 "2024-03-06T00:25:21Z")

</div>

I’ve received the logs via email already.

Thanks,  
Richard

---

<div class="post-metadata">

**Author:** ![elaine.ku](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elaine.ku/32/40026_2.png) [@elaine.ku](https://devforum.zoom.us/u/elaine.ku)\
**Post date:** [March 17, 2024, 11:15pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/8 "2024-03-17T23:15:16Z")

</div>

Hi @michaelpetersen ,

Our team checked the log and found that the user had joined the session more than once. Every time the user joins the session, the microphone will be turned on. Would you please try to check your application to see what causes the user to join multiple times?

1. The user joined as an attendee for the first time since someone opened this session before the user joined. After joining the session, the microphone will be turned on since ZoomVideoSDKAudioOption.mute=false.
2. After that, the host stopped the meeting. Then the user opened the session and joined again. At this moment, the microphone turned on again.

Please look into your project to check the logic to handle session leave and join the session. Thank you.

Elaine

---

<div class="post-metadata">

**Author:** ![michaelpetersen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michaelpetersen/32/49650_2.png) [@michaelpetersen](https://devforum.zoom.us/u/michaelpetersen)\
**Post date:** [March 19, 2024, 12:53pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/9 "2024-03-19T12:53:02Z")

</div>

@elaine.ku  
It doesn’t match with our experience. It keeps toggling.  
Can you see if it is the same call in the log? Maybe it is because I started two unrelated calls? I am not able to view the log myself.

I have another log where only started one call. if I can get your mail.

The problems seems to no longer occur on iOS 17.4, but it is still a problem on older versions. We have tested on 17.2.1 and 17.3

---

<div class="post-metadata">

**Author:** ![ray.elward](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ray.elward/32/51459_2.png) [@ray.elward](https://devforum.zoom.us/u/ray.elward)\
**Post date:** [March 19, 2024, 5:47pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/10 "2024-03-19T17:47:25Z")

</div>

I am experiencing the same issue with CallKit and ZoomVideo SDK 1.10.10.

We are using React Native Zoom Video SDK. When we updated from 1.6.2 to 1.10.10 it started happening. I have tried a number of things debugging from the native side and the RN javascript side without luck.

There are some instances where the mute cycle doesn’t start, but then if i manually mute as a user it does start up. So I imagine it has to do somewhere with the muting / unmuting that begins with a `await zoom.audioHelper.muteAudio(mySelf.userId);` call or joining a session with audioOptions.mute set to true or false.

Any guidance would be helpful. i’ll be debugging this because we have to upgrade off of version 1.6.2 in the coming weeks anyway. But this seems like a very serious bug to deal with before we can release to iOS.

---

<div class="post-metadata">

**Author:** ![ray.elward](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ray.elward/32/51459_2.png) [@ray.elward](https://devforum.zoom.us/u/ray.elward)\
**Post date:** [March 19, 2024, 7:57pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/11 "2024-03-19T19:57:14Z")

</div>

> [@michaelpetersen](#):
>
> The problems seems to no longer occur on iOS 17.4, but it is still a problem on older versions. We have tested on 17.2.1 and 17.3

So it looks like the test device I have been using is an iPad on 17.3.1. When testing a build on an iPhone with 17.4 it appears to not cause the issues.

So some combination of Zoom Video SDK \> 1.7 and iOS \< 17.4 seems to cause this endless interval. I need to test further on other devices, but I’m guessing this will need to be something we tell customers they need to update their OS if they run into it, which is not ideal.

---

<div class="post-metadata">

**Author:** ![michaelpetersen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michaelpetersen/32/49650_2.png) [@michaelpetersen](https://devforum.zoom.us/u/michaelpetersen)\
**Post date:** [March 20, 2024, 1:38pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/12 "2024-03-20T13:38:51Z")

</div>

Hi @ray.elward  
I am sorry that you have problems to, but I’m glad it’s not just me : D

No, telling our users to update is definitely not a good solution, and I don’t even think it would be possible for us.

I’ll keep debugging to. Please let me know if you find any workaround.

---

<div class="post-metadata">

**Author:** ![elaine.ku](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elaine.ku/32/40026_2.png) [@elaine.ku](https://devforum.zoom.us/u/elaine.ku)\
**Post date:** [March 27, 2024, 3:38am UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/13 "2024-03-27T03:38:50Z")

</div>

Hi @michaelpetersen,

I believe you had sent the log file to @richard.zoom before. Would you please send the log which only started one call to Richard? I’ll check with him for the log and look into it.  
Thank you!

Elaine

---

<div class="post-metadata">

**Author:** ![carlmagumpara](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carlmagumpara/32/53999_2.png) [@carlmagumpara](https://devforum.zoom.us/u/carlmagumpara)\
**Post date:** [April 3, 2024, 6:21am UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/14 "2024-04-03T06:21:02Z")

</div>

hi, any update here? is this resolved?

---

<div class="post-metadata">

**Author:** ![mar](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mar/32/49307_2.png) [@mar](https://devforum.zoom.us/u/mar)\
**Post date:** [April 3, 2024, 1:12pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/15 "2024-04-03T13:12:14Z")

</div>

The same issue here - the microphone keeps toggling every few seconds. Encountered this when trying to integrate CallKit.  
Does ZoomVideoSDK do something under the hood related to CallKit actions, for example requesting `CXSetMutedCallAction` transaction? In my case, CallKit constantly triggers this delegate function  
`func provider(_ provider: CXProvider, perform action: CXSetMutedCallAction)`,  
but I don’t request `CXSetMutedCallAction` on my own so seems like SDK does it somehow which is unexpected…

---

<div class="post-metadata">

**Author:** ![elaine.ku](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elaine.ku/32/40026_2.png) [@elaine.ku](https://devforum.zoom.us/u/elaine.ku)\
**Post date:** [April 9, 2024, 1:37am UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/16 "2024-04-09T01:37:37Z")

</div>

Hi All,

We’re investigating this issue internally and hope to make it fixed in our next release. Once the fixed version is confirmed, I’ll update it here.  
Thank you for all your patience.

Elaine

---

<div class="post-metadata">

**Author:** ![michaelpetersen](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michaelpetersen/32/49650_2.png) [@michaelpetersen](https://devforum.zoom.us/u/michaelpetersen)\
**Post date:** [April 9, 2024, 8:27am UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/17 "2024-04-09T08:27:05Z")

</div>

Great news!

Do you have any time horizon for the next release?

---

<div class="post-metadata">

**Author:** ![elaine.ku](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elaine.ku/32/40026_2.png) [@elaine.ku](https://devforum.zoom.us/u/elaine.ku)\
**Post date:** [April 11, 2024, 6:06pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/18 "2024-04-11T18:06:23Z")

</div>

Hi all,

We’ve noticed it is an issue that happened because of the implementation of the `Callkit`. Please try to override the function `(void)provider:(CXProvider *)provider performSetMutedCallAction:(CXSetMutedCallAction *)action` as below to see whether the issue still exists.  
Thank you

```auto
- (void)provider:(CXProvider *)provider performSetMutedCallAction:(CXSetMutedCallAction *)action {
    ZoomVideoSDKUser *mySelf = [[[ZoomVideoSDK shareInstance] getSession] getMySelf];
    BOOL isMute = action.isMuted;
    if (isMute) {
        [[[ZoomVideoSDK shareInstance] getAudioHelper] muteAudio:mySelf];
    }
    else {
        [[[ZoomVideoSDK shareInstance] getAudioHelper] unmuteAudio:mySelf];
    }
    [action fulfill];
}

```

Elaine

---

<div class="post-metadata">

**Author:** ![ray.elward](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ray.elward/32/51459_2.png) [@ray.elward](https://devforum.zoom.us/u/ray.elward)\
**Post date:** [April 26, 2024, 9:19pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/19 "2024-04-26T21:19:00Z")

</div>

Hello @elaine.ku

Is there a way for iOS using the React Native Zoom Video SDK Library to fix this? And any update on a bug fix release would be much appreciated!

Thanks,

Ray.

---

<div class="post-metadata">

**Author:** ![elaine.ku](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elaine.ku/32/40026_2.png) [@elaine.ku](https://devforum.zoom.us/u/elaine.ku)\
**Post date:** [April 26, 2024, 10:37pm UTC](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625/20 "2024-04-26T22:37:40Z")

</div>

Hi @ray.elward

Since we implemented the react native CallKit in our native code, we’ll fix this issue in our 1.11.0 release, which is targeted to be released next Friday.  
Thank you

Elaine

[Next page](https://devforum.zoom.us/t/microphone-keeps-turning-on-and-off-ios/104625.md?page=2)
