# Re-initialize SDK with a different JWT token

**URL:** <https://devforum.zoom.us/t/re-initialize-sdk-with-a-different-jwt-token/92016>\
**Category:** iOS\
**Created:** [July 18, 2023, 6:20pm UTC](https://devforum.zoom.us/t/re-initialize-sdk-with-a-different-jwt-token/92016 "2023-07-18T18:20:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frodella](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@frodella](https://devforum.zoom.us/u/frodella)\
**Post date:** [July 18, 2023, 6:20pm UTC](https://devforum.zoom.us/t/re-initialize-sdk-with-a-different-jwt-token/92016/1 "2023-07-18T18:20:57Z")

</div>

We are adding the Zoom Meeting SDK to our iOS and Android apps, and due to how our backend is set up, it is possible for us to have to re-initialize the SDK with different JWT token values within the same app “session”.

The idea is to have a pre-meeting screen where we obtain the JWT from our backend, initialize the SDK and then join a meeting. When the meeting is done, we’ll “uninitialize” the SDK and dismiss our UI, allowing the process to begin again in the future with a potentially different JWT token.

On Android, this approach is working fine. I’m able to call `ZoomSDK.getInstance().uninitialize()` when the meeting is done, and then later call `initialize` without issue. However, I haven’t been able to do the same on iOS. The `MobileRTC` class has no `uninitialize` method, and the closest I found was `cleanup`. However, calling that seems to put the shared `MobileRTC` instance in a weird state: it apparently works, but some time after I join a second meeting, the app will crash with a `EXC_BAD_ACCESS (code=EXC_I386_GPFLT)` and a completely obscure stack trace.

These are the variations I tried, and the results:

- Using `MobileRTC.shared()`
  - simply not doing anything when the meeting ends and later just calling `initialize` again → the method call returns false
  - calling `cleanup` when the meeting ends and then later calling `initialize` again → behavior I mentioned above

- Creating a new instance of `MobileRTC` myself
  - apparently this is not supported. An instance created like that will never succeed at the `initialize` call

I do have logging enable, so I can share the log file if you just tell me the best way to do so.

**Which iOS Meeting SDK version?**  
5.15.2.8888

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![frodella](https://avatars.discourse-cdn.com/v4/letter/f/e19b73/32.png) [@frodella](https://devforum.zoom.us/u/frodella)\
**Post date:** [August 3, 2023, 10:59am UTC](https://devforum.zoom.us/t/re-initialize-sdk-with-a-different-jwt-token/92016/2 "2023-08-03T10:59:13Z")

</div>

Just one hopeful bump before this thread gets closed automatically.

---

<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:** [September 2, 2023, 8:59pm UTC](https://devforum.zoom.us/t/re-initialize-sdk-with-a-different-jwt-token/92016/3 "2023-09-02T20:59:37Z")

</div>

Closed on September 2, 2023, 8:59pm UTC

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