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

  • SEARCH
  • Home
  • 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 8482925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:56:42+00:00 2026-06-10T19:56:42+00:00

I’m writing an application that runs in background mode that can track user (so

  • 0

I’m writing an application that runs in background mode that can track user (so sometimes updates location in background mode) and, by using region monitoring, informs him of nearby points. I do not use the feature of relaunching the application from region monitoring.

Currently, after getting the applicationWillTerminate: message, I stop location updates and remove all points from region monitoring. I noticed strange behaviour of the application. The following messages (in order like below) are delivered to the application after trying to kill it in multitasking menu:

  • applicationWillTerminate:
  • applicationDidEnterBackground:
  • (sometimes) one more locationManager:didUpdateToLocation:fromLocation:

If I don’t register background location mode for this application, it is just killed instead.

I’d like application to terminate like other applications after user kills it in the multitasking menu and not get messages from region monitoring (no points are tracked at that moment anyway). Still, I need to be able to use background location mode. The purpose is to minimize the usage of battery. What should I do to achieve that?

Also, why does the application receive applicationDidEnterBackground: after applicationWillTerminate:? Is it still running or not after shutting it down from multitasking menu?

  • 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-06-10T19:56:44+00:00Added an answer on June 10, 2026 at 7:56 pm

    In the end I tested it experimentally and checked if everything that is covered in documentation is true. It seems it is. Those are the results, that aren’t fully specified in documentation:

    If the application doesn’t support UIBackgroundModes like location, it is killed (receives signal 9) after terminating it in multitasking menu (after receiving applicationWillTerminate:).

    If the application supports location background mode, it receives applicationWillTerminate:, applicationDidEnterBackground: and is suspended. Before next launch of the application, it is silently terminated.

    If you’re monitoring a region in your application and it was terminated in multitasking menu, it will be relaunched on region events with UIApplicationLaunchOptionsLocationKey option. If user launches the application after that, it isn’t terminated but simply starts getting the applicationDidBecomeActive: and other messages.

    As expected, the application isn’t draining the battery after being terminated, if you stop monitoring all regions in applicationWillTerminate: method. Though, if you’d not stop monitoring regions and had high region monitoring accuracy set, then it is draining a lot of battery, even if terminated (since iOS is actively monitoring those points then).

    Behaviour of the application with set background location mode, after termination, is actually the same, whether you monitor regions or not. Only that in first case it just won’t ever get messages about entering region nor drain the battery.

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.