# Always return nil

**URL:** <https://devforum.zoom.us/t/always-return-nil/17813>\
**Category:** iOS\
**Created:** [May 15, 2020, 11:13am UTC](https://devforum.zoom.us/t/always-return-nil/17813 "2020-05-15T11:13:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![shankar1](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@shankar1](https://devforum.zoom.us/u/shankar1)\
**Post date:** [May 15, 2020, 11:13am UTC](https://devforum.zoom.us/t/always-return-nil/17813/1 "2020-05-15T11:13:41Z")

</div>

**Description**

if let auth = MobileRTC.shared().getAuthService(){  
auth.delegate = self  
auth.clientKey = kRTCSDKAppKey  
auth.clientSecret = kRTCSDKAppSecret  
auth.sdkAuth()  
}

---

<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 19, 2020, 10:00am UTC](https://devforum.zoom.us/t/always-return-nil/17813/2 "2020-05-19T10:00:03Z")

</div>

Hi [shankar1](https://devforum.zoom.us/u/shankar1),

Thanks for using Zoom SDK. Are you saying that you are getting nil from let auth = MobileRTC.shared().getAuthService()? Were you successfully initialized the SDK before getting the AuthService? You may refer to the implementation here: [https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/SDKPresenters/how\_to\_init\_auth\_sdk/how\_to\_init\_sdk/SDKInitPresenter.m#L19](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/SDKPresenters/how_to_init_auth_sdk/how_to_init_sdk/SDKInitPresenter.m#L19)

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![shankar1](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@shankar1](https://devforum.zoom.us/u/shankar1)\
**Post date:** [May 23, 2020, 8:54am UTC](https://devforum.zoom.us/t/always-return-nil/17813/3 "2020-05-23T08:54:38Z")

</div>

Thanks Carson,  
Now it’s working.

---

<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, 8:56am UTC](https://devforum.zoom.us/t/always-return-nil/17813/4 "2020-05-27T08:56:57Z")

</div>

Glad to hear that it is working now. Happy Zooming! 🙂

---

<div class="post-metadata">

**Author:** ![shankar1](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@shankar1](https://devforum.zoom.us/u/shankar1)\
**Post date:** [June 22, 2020, 8:52am UTC](https://devforum.zoom.us/t/always-return-nil/17813/5 "2020-06-22T08:52:40Z")

</div>

Hi Carson,  
Can create meeting or schedule meeting with the user id that is the users is logged-in thought app. if it is possible or not, please guide how can i achieve this.

---

<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:** [June 23, 2020, 6:43am UTC](https://devforum.zoom.us/t/always-return-nil/17813/6 "2020-06-23T06:43:33Z")

</div>

Hi @shankar1,

To create meeting, you may start an instant meeting. And to schedule a meeting, you may use the interfaces in MobileRTCPremeetingServices([https://zoom.github.io/zoom-sdk-ios/interface\_mobile\_r\_t\_c\_premeeting\_service.html](https://zoom.github.io/zoom-sdk-ios/interface_mobile_r_t_c_premeeting_service.html)) to schedule a meeting.

You may refer to the implementation in our demo app: [https://github.com/zoom/zoom-sdk-ios/tree/master/MobileRTCSample/MobileRTCSample/SDKPresenters/other\_features/schedule\_meeting\_for\_login\_user](https://github.com/zoom/zoom-sdk-ios/tree/master/MobileRTCSample/MobileRTCSample/SDKPresenters/other_features/schedule_meeting_for_login_user)

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![shankar1](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@shankar1](https://devforum.zoom.us/u/shankar1)\
**Post date:** [June 25, 2020, 11:34am UTC](https://devforum.zoom.us/t/always-return-nil/17813/7 "2020-06-25T11:34:53Z")

</div>

Thanks Carson for your response,

Actually my need is that we have a list of users in our app and one of them can schedule or start meeting, so how can i manage this scenario.  
We have to register all the members/ users with the zoom?  
How can we manage this?

---

<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:** [June 27, 2020, 2:49am UTC](https://devforum.zoom.us/t/always-return-nil/17813/8 "2020-06-27T02:49:29Z")

</div>

Hi @shankar1,

You can schedule a meeting using the SDK interfaces I mentioned above or using Zoom API to schedule a meeting([https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate](https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate)), once a meeting has scheduled, participants can join using SDK without registration or login. So as long as you are able to schedule a meeting, the user registration is not required.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![shankar1](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@shankar1](https://devforum.zoom.us/u/shankar1)\
**Post date:** [August 10, 2020, 2:08pm UTC](https://devforum.zoom.us/t/always-return-nil/17813/9 "2020-08-10T14:08:14Z")

</div>

let dateFormatter = DateFormatter()

dateFormatter.dateFormat = “yyyy-MM-dd HH:mm a”

guard let date = dateFormatter.date(from: mTimeTextField.text ?? “”) else { return }

meetingService = MobileRTC.shared().getPreMeetingService()

if let service = meetingService{

if let meetingItem = service.createMeetingItem(){

meetingItem.setMeetingID(“1232214”)

meetingItem.setMeetingTopic(mTopicTextField.text ?? “”)

meetingItem.setStartTime(date)

meetingItem.setTimeZoneID(TimeZone.current.identifier)

if let duration = mDurationTextField.text, duration.count \> 0{

meetingItem.setDurationInMinutes(UInt(duration) ?? 0)

}

meetingItem.setMeetingPassword(mPasswordTextField.text ?? “”)

meetingService?.scheduleMeeting(meetingItem, withScheduleFor: “”)

meetingService?.destroy(meetingItem)

}

}

I am not getting the meetingItem.

---

<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:** [August 12, 2020, 6:50am UTC](https://devforum.zoom.us/t/always-return-nil/17813/10 "2020-08-12T06:50:53Z")

</div>

Hi @shankar1,

Thanks for the code snippet. Could you elaborate on “not getting the meetingItem”? Are you getting any error? You could refer to the implementation here: [https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/ScheduleTableViewController.m#L473](https://github.com/zoom/zoom-sdk-ios/blob/master/MobileRTCSample/MobileRTCSample/ScheduleTableViewController.m#L473)

Thanks!

---

<div class="post-metadata">

**Author:** ![shankar1](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@shankar1](https://devforum.zoom.us/u/shankar1)\
**Post date:** [August 13, 2020, 7:03am UTC](https://devforum.zoom.us/t/always-return-nil/17813/11 "2020-08-13T07:03:11Z")

</div>

Hi Carson,  
I am getting the nil while creating the object of the meeting item.

 ![Screenshot 2020-08-13 at 12.30.56 PM.png](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/6/62dca78a222495b22d2a5015ba9edec7d1694955.png)
