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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:33:51+00:00 2026-05-28T20:33:51+00:00

I am writing a location based application for iOS 5. The application is using

  • 0

I am writing a location based application for iOS 5. The application is using the CLLocationManager to receive Location updates.

When the application is started I am creating the LocationManager, calling [self.locationManager startUpdatingLocation]; and the grey location arrow appears in the statusbar.

When the application enters background I am calling

[self.locationManager stopUpdatingLocation]; 
[self.locationManager startMonitoringSignificantLocationChanges];

cause I just want to receive significant location changes while the app is in background. The grey location arrow is still shown.

I also have an exit button in my application where I am calling

[self.locationManager stopUpdatingLocation];
exit(0);

When the user presses the Exit-Button the application finishes and the grey location button disappears from the statusbar. Everythings fine until now.

A problem appears, when the users finishes the application using the Fast App Switcher, because afterwards the grey location arrow is still shown in the status bar, although the application isn’t running. The grey location arrow first disappears, when the user removes the application from his iPhone.

So the questions are:

  • When the users finishes the application using Fast App Switcher and the grey arrow is still shown in the status bar, does this mean, that location updates are still executed or does this mean, that an application used Location services whithin the last 24 hours? I guess the answer is the first one, location updates are still executed!

  • The application needs to be executed in background, so I can’t stop the LocationManager when the application enters background. applicationWillTerminate: gets never called when the user kills the application using Fast App Switcher. Is there any way to receive an event, when the application is terminated using Fast App Switcher or is terminated by the the OS????

  • I’ve seen some other applications, where the grey arrow in the status bar disappears when the application is killed using Fast App Switcher. How does these applications achieve this???

  • 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-28T20:33:52+00:00Added an answer on May 28, 2026 at 8:33 pm
    1. Significant Location updates are available if you app is not in foreground.
    2. I just give you an idea I have done something like this but I don’t know what happens in your case.
      Just register your app for background task and do some thing for testing purpose in that case if you kill your app via fast app switching then the delegate method applicationWillTerminate: is always called.

    ___________Edited______________
    just add this varibale into your AppDelegate.h

    UIBackgroundTaskIdentifier bgTask;
    

    and make your delegate method like this and now kill your app

        - (void)applicationDidEnterBackground:(UIApplication *)application
        {
            UIApplication *app = [UIApplication sharedApplication];
            if ([app respondsToSelector:@selector(beginBackgroundTaskWithExpirationHandler:)]) {
                bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
                    // Synchronize the cleanup call on the main thread in case
                    // the task actually finishes at around the same time.
                    dispatch_async(dispatch_get_main_queue(), ^{
                        if (bgTask != UIBackgroundTaskInvalid)
                        {
                            [app endBackgroundTask:bgTask];
                            bgTask = UIBackgroundTaskInvalid;
                        }
                    });
                }];
            }
        }
    
    - (void)applicationWillTerminate:(UIApplication *)application
    {
        NSLog(@"is terminated");
    }
    

    _____________________________

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

Sidebar

Related Questions

I'm writing my first location based android app, but got confused about some of
I'm writing an updater for an msaccess based application that has several linked .accdb
I am writing app, that collects location data, based on GPS. And i have
I'm writing an app that allows you to filter database results based on Location
I'm using a third party url to determine the location of site visitors based
I have an application where I try to get address of a location based
I am writing an application that logs status updates (GPS locations) from devices to
I am writing a map-based iphone app that will send the current location data
I refresh pages by writing window.location = window.location; . However this doesn't work on
I'm writing an iPhone App that relies on getting the device location. Management have

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.