# MobileRTC initialization seems to be deleting /library/caches/data directory

**URL:** <https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946>\
**Category:** iOS\
**Created:** [January 19, 2021, 8:59am UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946 "2021-01-19T08:59:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jumar](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jumar](https://devforum.zoom.us/u/jumar)\
**Post date:** [January 19, 2021, 8:59am UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/1 "2021-01-19T08:59:46Z")

</div>

**Description**  
MobileRTC initialization seems to be deleting /library/caches/data directory(upon calling [[MobileRTC sharedRTC] initialize:context])

**Which version?**  
5.0.24433.0616

**To Reproduce(If applicable)**  
Steps to reproduce the behavior:

1. initialize MobileRTC with the following context:

- domain = kSDKDomain;
- enableLog = YES;
- locale = MobileRTC\_ZoomLocale\_Default;

**Smartphone (please complete the following information):**  
Device Model: iPad7,5  
iOS Version: 12.3.1

**Additional context**  
Please note that this only happens on fresh install of our app.

---

<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:** [January 19, 2021, 5:14pm UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/2 "2021-01-19T17:14:02Z")

</div>

Hey @jumar

Thanks for using the dev forum!

Would you be able to record a video of this happening?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![jumar](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jumar](https://devforum.zoom.us/u/jumar)\
**Post date:** [January 20, 2021, 7:40am UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/3 "2021-01-20T07:40:48Z")

</div>

Hi @Michael_Condon

Attached GIF is the deletion of the /data folder (as I can’t seem to upload a video file)

Please note that this seems to be replicable on version 5.4.54520.1229

Thanks!  
Jumar

 ![deleted2](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/9/f96345314862589bda7398e9286124781d231d09.gif)

---

<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:** [January 20, 2021, 10:57pm UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/4 "2021-01-20T22:57:53Z")

</div>

Hey @jumar,

What version of OSX are you on? I can’t seem to find that folder.

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![jumar](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jumar](https://devforum.zoom.us/u/jumar)\
**Post date:** [January 21, 2021, 3:01am UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/5 "2021-01-21T03:01:36Z")

</div>

Hi @Michael_Condon

This was replicated via iOS simulator.  
Directory should be the one provided by the OS via NSCachesDirectory

---

<div class="post-metadata">

**Author:** ![jumar](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jumar](https://devforum.zoom.us/u/jumar)\
**Post date:** [January 21, 2021, 4:06am UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/6 "2021-01-21T04:06:51Z")

</div>

Hi @Michael_Condon

as an update. This seems to be replicable even if our app is not freshly installed. /data from NSCachesDirectory seems to be deleted on first use of MobileRTC

---

<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:** [January 21, 2021, 11:32pm UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/7 "2021-01-21T23:32:02Z")

</div>

Hey @jumar

Are you seeing this happen in the sample application as well?

Thanks!  
Michael

---

<div class="post-metadata">

**Author:** ![jumar](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jumar](https://devforum.zoom.us/u/jumar)\
**Post date:** [January 22, 2021, 2:58am UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/8 "2021-01-22T02:58:58Z")

</div>

Hi @Michael_Condon

Upon replication, yes this is happening on the sample application as well.  
However, please note that I added /data folder inside the Caches folder before MobileRTC initialization to simulate what is happening on our side.

thank you

---

<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:** [January 22, 2021, 9:37pm UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/9 "2021-01-22T21:37:44Z")

</div>

Hey @jumar,

Ok sounds good. I will talk to the team about this.

Thanks!  
Michael

---

<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:** [January 25, 2021, 5:51pm UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/10 "2021-01-25T17:51:05Z")

</div>

Hey @jumar,

After speaking with the engineers, they have tested and confirmed that the SDK will not delete this folder itself. This is likely a side effect of something else.  
[https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple\_ref/doc/uid/TP40010672-CH2-SW1](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW1)

Thank you!  
Michael

---

<div class="post-metadata">

**Author:** ![jumar](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jumar](https://devforum.zoom.us/u/jumar)\
**Post date:** [January 26, 2021, 9:35am UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/11 "2021-01-26T09:35:23Z")

</div>

Hi @Michael_Condon

Is the cause of the side effect found from the sample app?  
So we can counter check if we’re doing the same on our app as well.

Thank you!

---

<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:** [January 26, 2021, 7:08pm UTC](https://devforum.zoom.us/t/mobilertc-initialization-seems-to-be-deleting-library-caches-data-directory/40946/12 "2021-01-26T19:08:40Z")

</div>

Hey @jumar,

I have not seen this happen in the sample app on my end.

Thanks!  
Michael
