# iOS setAutoConnectInternetAudio

**URL:** <https://devforum.zoom.us/t/ios-setautoconnectinternetaudio/42480>\
**Category:** Meeting SDK\
**Created:** [February 3, 2021, 8:23pm UTC](https://devforum.zoom.us/t/ios-setautoconnectinternetaudio/42480 "2021-02-03T20:23:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benmurphy\_zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/benmurphy_zoom/32/20925_2.png) [@benmurphy\_zoom](https://devforum.zoom.us/u/benmurphy_zoom)\
**Post date:** [February 3, 2021, 8:23pm UTC](https://devforum.zoom.us/t/ios-setautoconnectinternetaudio/42480/1 "2021-02-03T20:23:40Z")

</div>

**Description**  
Hi, we’re trying to get our app to auto connect to internet audio so users don’t have to tap to enable. We’re experiencing some weird behavior when making the connection and can’t figure out how to get it to work properly.

I’d appreciate any help or guidance users or Zoom could offer here. To be quite honest we’ve inherited a rough code base and it wouldn’t surprise me if we’re way off base.

Thanks in advance!

We are using mieszko’s react native bridge [GitHub - mieszko4/react-native-zoom-us](https://github.com/mieszko4/react-native-zoom-us) but it seems our problem is in the objective-c layer. I’ve attached the relevant code below for joining the meeting.

What we’re seeing now is:

If we set `joinParam.noAudio = **NO** ; joinParam.noVideo = **NO** ;` then the meeting connects fine - but without auto connecting audio.

If we set `noAudio & noVideo = YE`S then we get the following in the console and the meeting never connects, we just get the “waiting” spinner

```
**2021-02-03 12:09:47.335007-0800 Ortholive[19335:4348033] nZoomSDKInitializeResult, errorCode=0**

**2021-02-03 12:09:47.350769-0800 Ortholive[19335:4348033] joinMeeting, joinMeetingResult=0**

```

**Which version?**  
5.0.24433.0616 & Miezko4’s React Native Zoom Us [GitHub - mieszko4/react-native-zoom-us](https://github.com/mieszko4/react-native-zoom-us)

- I know RNZoomUS isn’t an official Zoom library, however it seems like the issue I’m having here is at a lower level.

**Relevant Code**

```
RCT_EXPORT_METHOD(

```

joinMeeting: (NSDictionary \*)data  
withResolve: (RCTPromiseResolveBlock)resolve  
withReject: (RCTPromiseRejectBlock)reject  
)  
{  
@try {  
meetingPromiseResolve = resolve;  
meetingPromiseReject = reject;

```
MobileRTCMeetingService *ms = [[MobileRTC sharedRTC] getMeetingService];
if (ms) {
  ms.delegate = self;

  MobileRTCMeetingJoinParam * joinParam = [[MobileRTCMeetingJoinParam alloc]init];
  joinParam.userName = data[@"userName"];
  joinParam.meetingNumber = data[@"meetingNumber"];
  joinParam.password = data[@"password"];
  joinParam.participantID = data[@"participantID"];
  joinParam.zak = data[@"zoomAccessToken"];
  joinParam.webinarToken = data[@"webinarToken"];
  joinParam.noAudio = NO;
  joinParam.noVideo = NO;
  [ms connectMyAudio: YES];
  MobileRTCMeetingSettings *settings = [[MobileRTC sharedRTC] getMeetingSettings];
  [[[MobileRTC sharedRTC] getMeetingSettings] setAutoConnectInternetAudio:YES];
  MobileRTCMeetError joinMeetingResult = [ms joinMeetingWithJoinParam:joinParam];

    BOOL isAutoConnected = [settings autoConnectInternetAudio];
    BOOL isAudioMuted = [settings muteAudioWhenJoinMeeting];
    BOOL isVideoMuted = [settings muteVideoWhenJoinMeeting];
    BOOL disabled = [settings driveModeDisabled];
    BOOL disabledCallIn = [settings callInDisabled];
    BOOL disabledCallOut = [settings callOutDisabled];

    
  NSLog(@"joinMeeting, joinMeetingResult=%d", joinMeetingResult);
}

```

} @catch (NSError \*ex) {  
reject(@“ERR\_UNEXPECTED\_EXCEPTION”, @“Executing joinMeeting”, ex);  
}  
}

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [February 3, 2021, 9:20pm UTC](https://devforum.zoom.us/t/ios-setautoconnectinternetaudio/42480/2 "2021-02-03T21:20:30Z")

</div>

Hey @benmurphy_zoom,

Thanks for using the dev forum!

I know it is a bit confusing but the error code 0 in this case means success.

Setting noAudio to true means that the meeting will be a video only meeting until the user manually connects their audio. The same goes for noVideo respectively.  
Setting these to false does not automatically connect them, rather it enables them to be connected automatically. You would set these to yes to have a audio only or video only meeting respectively.

To connect the audio you would have to wait until the user has successfully joined the meeting then you would call the connectMyAudio function from the MobileRTCMeetingService.

For your use case, I dont think you should need to set the noAudio/noVideo params at all.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![benmurphy\_zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/benmurphy_zoom/32/20925_2.png) [@benmurphy\_zoom](https://devforum.zoom.us/u/benmurphy_zoom)\
**Post date:** [February 3, 2021, 9:46pm UTC](https://devforum.zoom.us/t/ios-setautoconnectinternetaudio/42480/3 "2021-02-03T21:46:52Z")

</div>

Thanks Michael -that makes sense. I’ll give it a try. I appreciate your advice.

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [February 4, 2021, 7:45pm UTC](https://devforum.zoom.us/t/ios-setautoconnectinternetaudio/42480/4 "2021-02-04T19:45:53Z")

</div>

Hey @benmurphy_zoom,

Sounds good! Let me know how it goes.

Thanks!  
Michael
