How to manage sessions with AFNetworking?

前端 未结 2 1519
一向
一向 2020-12-07 09:27

As the title implies, I am using AFNetworking in an iOS project in which the application talks to a server. When the user signs in, the server responds by sending back a suc

2条回答
  •  余生分开走
    2020-12-07 09:49

    This depends on the specification given by the service you are interacting with. I have worked with similar services and they have explicitly stated in their documentation that, In order to maintain the session valid I must poll the service at every few seconds by sending int "1".

    However, If possible could please post the service name or any reference which we can read. If it is any company's private API then they must have described the use of the session id which they are returning.


    Underlying technologies will take care of it, However if you want to persist those cookies then this answer for other question.

    Persisting Cookies In An iOS Application?

提交回复
热议问题