How to check whether session live or expired in Quickblox iOS SDK?

我与影子孤独终老i 提交于 2019-12-20 05:45:32

问题


I know that, any session will be expired after last request (made before 2 hours) to the Quickblox server. When I create a session, I'm able to find [QBBaseModule sharedModule].tokenExpirationDate but I'm not sure how it works and how should I check for whether session is live or expired?

  1. How to check whether session is live or expired?

  2. If I create a session, I'll get [QBBaseModule sharedModule].tokenExpirationDate for next 2 hours, now within an hour I'll made a request to the server, would it update [QBBaseModule sharedModule].tokenExpirationDate date too?


回答1:


  1. By checking tokenExpirationDate.
  2. tokenExpirationDate is updated in every response from QuickBlox. So answer is - yes.


来源:https://stackoverflow.com/questions/27074234/how-to-check-whether-session-live-or-expired-in-quickblox-ios-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!