1

I am trying Sendbird for chat messages in an native iOS app. They have an add-on SyncManager. Which caches the channel list and messages locally on the phone for offline support.

My app lets users logout of the app. At this time, I want to clear existing cache of the messages/channel list or anything else SyncManager stores.

My question is: how do I clear all the details from the SyncManager? Their official document mentions SBSMSyncManager.clearCache() but they also mentions to use this method only for debugging purpose and is not recommended for other (production?) purposes.

What is the "recommended" way to clear everything from the SyncManager?

Sunil Chauhan
  • 1,804
  • 14
  • 31

1 Answers1

0

The SyncManager clears the cache when the next user is logged in when you call the .setup() command.

Calling clearCache() manually beforehand results in some extra calls in the backend but you can actually use it in a production setting.

Jalakoo
  • 3,073
  • 2
  • 18
  • 18