Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7689475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:10:26+00:00 2026-05-31T20:10:26+00:00

I had developed an API Rest for an iPhone Game and it works properly.

  • 0

I had developed an API Rest for an iPhone Game and it works properly. But I have a problem in iPhone that in each Response I had to check if session expired. I think that it is not so good, because I am copying the same piece of code on every response handler.

I think that I could make a helper or wrapper class for checking if session expire and if it happens, it will tries to get new session cookie.

I want to know if exist a native or better way to check expiration time session?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:10:27+00:00Added an answer on May 31, 2026 at 8:10 pm

    NSURLConnection should handle cookies for you. If your cookie has expired, on the next call you make you should get a 401 response.

    Depending on how you implemented your calls you should have a method such as:

    - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
    

    response.statuscode will be 401 if the cookie is expired. From here you can do the necessary re-validation that your app requires.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I developed for the iPhone I had multiple events on touch that could
I had developed an application in visual Studio 2005. whenever i run that application
A while a go I had to developed a music site that allowed audio
I have an issue that on one computer applications developed using the Windows Presentation
I'm currently developing a game on iPhone using the Cocos2D API. It's going well.
We have a system that was originally developed decades ago and has increased in
Let's say you have a complex resource in a REST API. You have several
I had developed a script, earlier I use to transfer it directly without any
My last employer had developed an elaborate system which sat on top of SVN
I was wondering if anyone had developed an approach for using NHibernate / Fluent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.