# getMeetingService=nil

**URL:** <https://devforum.zoom.us/t/getmeetingservice-nil/5642>\
**Category:** macOS\
**Created:** [August 22, 2019, 7:05am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642 "2019-08-22T07:05:06Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![897132128](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/897132128/32/1483_2.png) [@897132128](https://devforum.zoom.us/u/897132128)\
**Post date:** [May 27, 2020, 1:02am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/23 "2020-05-27T01:02:31Z")

</div>

You need to initialize in appdelegate class

```
BOOL useCustomizedUI = NO;
ZoomSDK* sdk = [ZoomSDK sharedSDK];

NSString* domain = kZoomSDKDomain;
NSString* key = kZoomSDKKey;
NSString* secret = kZoomSDKSecret;

[sdk initSDK:useCustomizedUI];
[sdk setZoomDomain:domain];

ZoomSDKError ret = [[sdk getAuthService] sdkAuth:key appSecret:secret]
```

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [May 27, 2020, 4:13am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/24 "2020-05-27T04:13:50Z")

</div>

Hi @tmiskiew,

Thanks for the reply. Please try to retrieve the userID from the callback `- (void)onUserJoin:(NSArray*)array` instead of the callback `onUserAudioStatusChange`.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![rajking229](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rajking229/32/4215_2.png) [@rajking229](https://devforum.zoom.us/u/rajking229)\
**Post date:** [October 7, 2020, 7:38am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/25 "2020-10-07T07:38:33Z")

</div>

i need sample project please provide me .

still am getting meetingservice null

---

<div class="post-metadata">

**Author:** ![rajking229](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rajking229/32/4215_2.png) [@rajking229](https://devforum.zoom.us/u/rajking229)\
**Post date:** [October 7, 2020, 7:39am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/26 "2020-10-07T07:39:32Z")

</div>

i need sample project please provide me .

still am getting meetingservice null please help me

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [October 10, 2020, 3:00am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/27 "2020-10-10T03:00:09Z")

</div>

Hi @rajking229,

Thanks for the reply. Are you getting null form MeetingService in the demo app or your own app that integrates the SDK?

Thanks!

---

<div class="post-metadata">

**Author:** ![rajking229](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rajking229/32/4215_2.png) [@rajking229](https://devforum.zoom.us/u/rajking229)\
**Post date:** [October 10, 2020, 6:20pm UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/28 "2020-10-10T18:20:00Z")

</div>

demo app not working when i run the app zoomsdk.h file not found issue came?

---

<div class="post-metadata">

**Author:** ![rajking229](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rajking229/32/4215_2.png) [@rajking229](https://devforum.zoom.us/u/rajking229)\
**Post date:** [October 10, 2020, 6:33pm UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/29 "2020-10-10T18:33:45Z")

</div>

demo app not working when i run the app zoomsdk.h file not found issue came?

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [October 17, 2020, 2:48am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/30 "2020-10-17T02:48:40Z")

</div>

Hi @rajking229,

Thanks for the reply. I just try the demo app and I am not able to reproduce the issue you are facing. Here are the steps to run the demo app:

1. Download the latest version of SDK([https://github.com/zoom/zoom-sdk-macos/releases/tag/v5.2.41735.0929](https://github.com/zoom/zoom-sdk-macos/releases/tag/v5.2.41735.0929))
2. Move the “Zoom SDK” folder into “ZoomSDKSample”
3. Open “ZoomSDKSample” and use Xcode 10 to open the ZoomSDKSample.xcodeproj
4. Build and run the sample app  
Please have a try and hope this helps.

Thanks!

---

<div class="post-metadata">

**Author:** ![muhammad.aurangzaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/muhammad.aurangzaib/32/18733_2.png) [@muhammad.aurangzaib](https://devforum.zoom.us/u/muhammad.aurangzaib)\
**Post date:** [November 13, 2020, 10:45am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/31 "2020-11-13T10:45:45Z")

</div>

Thanks for you help, I did same settings of my project. but “let service = zoomsdk?.getMeetingService()” always return me nil. Not have idea or even not got any solution how to resolve it.  
Waiting for you kind response.  
Thanks in-advance

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 24, 2020, 6:09pm UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/32 "2020-11-24T18:09:07Z")

</div>

Hi @muhammad.aurangzaib, thanks for using the dev forum.

Typically, `getMeetingService()` returns nil when the SDK has not been properly initialized. There are a few potential causes of this, so we will need to get more information in order to determine what is going wrong.

Can you please what value you are seeing returned from the `initSDK` method as well as the value of the parameter in the `onZoomSDKAuthReturn` callback?

Thanks!

---

<div class="post-metadata">

**Author:** ![muhammad.aurangzaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/muhammad.aurangzaib/32/18733_2.png) [@muhammad.aurangzaib](https://devforum.zoom.us/u/muhammad.aurangzaib)\
**Post date:** [November 27, 2020, 9:35am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/33 "2020-11-27T09:35:09Z")

</div>

Thanks @jon.zoom for reaching me out. in `onZoomSDKAuthReturn` callback I received

**PAC result block not invoked**

**2020-11-27 14:23:00.004916+0500 Zoom-SDK-Test[9005:256228] Received XPC error Connection invalid for message type 3 kCFNetworkAgentXPCMessageTypePACQuery**  
**\_\_C.ZoomSDKAuthError(rawValue: 5)** error.

here is my code.

```
let sdk = ZoomSDK.shared()
   sdk?.initSDK(true) 
  sdk?.zoomDomain = "zoom.com"       
  let authContext = ZoomSDKAuthContext()
  authContext.jwtToken = [redacted]

```

let authService = sdk?.getAuthService()  
authService?.sdkAuth(authContext)  
authService?.delegate = self  
authService?.sdkAuth(key, appSecret: secret)  
authService?.login(userEmail, password: userPassword, rememberMe: true)

let isAuth = authService?.isAuthorized()  
debugPrint(isAuth)

I’m login [Zoom.us](http://Zoom.us) with Gmail, I used password from Personal Meeting ID session URL pwd param.

 ![Screenshot 2020-11-27 at 2.28.00 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/5/150d0f045c3712f1e87b097680533c8ca4ab6b1e.png)

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [November 30, 2020, 10:41pm UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/34 "2020-11-30T22:41:02Z")

</div>

Hi @muhammad.aurangzaib, thanks for the additional info.

Looking through your code, I noticed that you are using `zoom.com` as the domain. I tested this locally and it seems to work (presumably because it is redirected), but the correct domain is `zoom.us`.

That being said, based on the error code you are receiving, it appears to be a network-related issue. Please ensure that you are able to access the internet within your application and on the device you are running it on.

Lastly, I had to remove the jwtToken value from your post for security purposes. As a reminder, you should never share your developer credentials or other privileged information on this forum or anywhere publicly. Before I removed it, I found that the structure of it is not correct. [Here](https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/sdk-initialization#composing-jwt-for-sdk-initialization) is an example of how the JWT should be structured.

Thanks!

---

<div class="post-metadata">

**Author:** ![muhammad.aurangzaib](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/muhammad.aurangzaib/32/18733_2.png) [@muhammad.aurangzaib](https://devforum.zoom.us/u/muhammad.aurangzaib)\
**Post date:** [December 10, 2020, 10:27am UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/35 "2020-12-10T10:27:35Z")

</div>

Thanks for you reply, I did set all the thing which you told me, but now it return ZoomSDKAuthError\_Timeout in onZoomSDKAuthReturn delegate method.

Now I’m using correct user email and password also using other authentication keys like SDK key and SDK secret as well.  
but still not getting succeed.

Here is error log:

```
2020-12-10 15:36:16.060588+0500 Zoom-SDK-Test[14713:359106] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:21 Err:-1 Errno:1 Operation not permitted
2020-12-10 15:36:16.178613+0500 Zoom-SDK-Test[14713:359106] dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:21 Err:-1 Errno:1 Operation not permitted
__C.ZoomSDKAuthError(rawValue: 4)

```

Kindly help me.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 10, 2020, 7:57pm UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/36 "2020-12-10T19:57:28Z")

</div>

Hi @muhammad.aurangzaib,

Based on the logs you have provided, it appears that your OS is blocking your application from accessing the internet, resulting in the SDK not being able to connect to our auth servers.

Thanks!

---

<div class="post-metadata">

**Author:** ![engineering4](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/engineering4/32/35827_2.png) [@engineering4](https://devforum.zoom.us/u/engineering4)\
**Post date:** [May 14, 2022, 3:34pm UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/37 "2022-05-14T15:34:07Z")

</div>

In case anyone else ends up here in 2022 with `getMeetingService` returning nil, and you’ve exhausted all other options explained in this thread, and the sample code works but yours doesn’t, I’d like to put on the record what my problem was.

Even if `sdkAuth:` returns success, you can’t immediately call `getMeetingService`. You must wait for the delegate callback `onZoomSDKAuthReturn:` before `getMeetingService` will succeed!

-Ken

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [May 16, 2022, 9:21pm UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/38 "2022-05-16T21:21:36Z")

</div>

Hi @engineering4, thanks for sharing your solution!

You are correct that you must wait for the SDK auth callback before using other classes within the SDK. We plan on improving our documentation to make this clear in the future, but glad you were able to find this out!

Thanks!

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [May 16, 2022, 9:21pm UTC](https://devforum.zoom.us/t/getmeetingservice-nil/5642/39 "2022-05-16T21:21:39Z")

</div>

Closed on May 16, 2022, 9:21pm UTC



[Previous page](https://devforum.zoom.us/t/getmeetingservice-nil/5642.md?page=1)
