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 4562044
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:09:37+00:00 2026-05-21T18:09:37+00:00

Maybe you could help me to find the appropriate way to handle this :

  • 0

Maybe you could help me to find the appropriate way to handle this :

  1. I have a NSTimer (started in my AppDelegate) which fires a class to launch a asynchronous server request (I use ASIFormDataRequest)
  2. When HTTP JSON-response is received, I parse it using TouchJSON
  3. Then I loop the NSDictionary obtained to fill a dedicated NSManagedObjectContext
  4. Then I save this context on some user interactions

Sometimes the HTTP request is sent and the user quit the application. I want to get extra time in order to complete tasks 2 to 4 in background.

I read the Apple doc but it is still not clear how to gain extra time for an asynchronous action already started ?

In short, how should i use the beginBackgroundTaskWithExpirationHandler ?

Thanks for your very usefull help.

Kheraud

  • 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-21T18:09:37+00:00Added an answer on May 21, 2026 at 6:09 pm

    ASIHTTPRequest supports running requests in the background:

    [request setShouldContinueWhenAppEntersBackground:YES];
    

    If you do steps 2-4 inside the delegate notifications and set the above flag then that should do what you want.

    You won’t be able to interact with the user once your application has entered the background though.

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

Sidebar

Related Questions

UPDATE AT THE BOTTOM Maybe somebody could help with this... been struggling with it
Maybe I'm having a really bad day, but could someone possibly help me to
I looked around and couldn't find it! Maybe I didn't look hard enough,but this
It this possible? How? (Maybe silly question, but I couldn't find answer :( )
I feel really silly to not be able to find this answer anywhere. Could
I was wondering if someone could help me get pointers to solve this problem.
I was hoping you could help me find a solution to a problem I'm
I was hoping maybe someone could help me solve my issue. I get a
Could someone please help me with this. I would like to install the AWDB
Maybe the title could be rephrased slightly better but basically I'm wondering how the

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.