Skip to main content

Apple improves Location Services in iOS 8 with “When In Use” mode, Visit Monitoring

Apple already forces developers to request authorization for all types of location services, and it also provides small indicator icons on iOS to let users know when apps are using location. In iOS 8, Apple is improving its location services for both developers and users by providing users with additional transparency with new location authorization requests. It’s also letting app developers tap into more location data from users with a new feature called “Visit Monitoring”.

When-In-Use-02First up. Apple is adding a new authorization request type in addition to the one it currently does for apps that ask for permission to access a user’s location. The new type of authorization is called “When In Use” and allows developers to ask for permission to only use location data when an app is in use. Previously Apple had a single authorization type referred to now as “Always”. What this means for users is a new blue status bar for apps that opt to request “When In Use” permission to let them know the app is currently getting continuous location data in the background.

The bar is much like a status bar for navigation in the background and allows users to jump into the app by tapping it. The blue bar won’t appear for apps that use the old “Always” authorization as in that case users have already granted permission to always tap into the location data. Some apps required to use Always are those that use Background App Refresh or Region Monitoring features. For the “Always” authorization, Apple will also prompt users every so often to remind them and ask permission to continue collecting data in the background.

The change allows users to have more control over what apps are getting data when and also allow some apps to automatically start getting location info only once opened by the user. Apple has always presented an authorization request for apps using location like the one pictured above, but it is now making it mandatory for devs to also include custom text on that message informing the user what exactly they are use location for. With the new When In Use authorization, Apple gives the following custom text example: “This app needs your location to automatically detect locations you visit during your day.”

Since there are now two authorization types, there are also some changes coming to the Location Services Settings pane. You will be able to see at a glance what apps are using When In Use vs Always authorization for location, and you will also be able to switch between both the various authorization types for apps that support both.

Apple is also making location services accessible from an app’s settings pane in the Settings app in iOS 8, from which developers can also now provide a quick link to directly within their app.

There’s a reason Apple is beefing up the way it handles authorization requests for location in iOS 8: It’s providing developers with a new feature called “Visit Monitoring” that tracks users location to provide much more robust location data for specific use cases. iOS can already track things like continuous location updates, significant location changes, and region monitoring, but they have some downsides like power consumption, updates only every few hundred meters, or a limited number of interesting locations that have to be specified by the developer.

That brings us to the new Visit Monitoring feature that Apple has designed to track your movements and determine important destinations. Developers will be able to tap into the data in order to get location data about what places a user visits often, for example. Perhaps the most interesting thing here is how Visit Monitoring taps into the entire system. If a user charges their phone in the same location every time, for instance, iOS will learn that to better let apps know when you’re arriving home.

Apple will also let Visit Monitoring tap into the Maps app to improve the data and, in return, let developers improve their apps using it. Rather than monitoring landmarks or special locations like Region Monitoring, Visiting Monitoring instead tracks where users spend the most time and will also get hints from what they do with their device like the charging example mentioned above.

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Mac — experts who break news about Apple and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Mac on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Comments

  1. tilalabubakr - 10 years ago

    GREAT

  2. Stuart Steel - 10 years ago

    Might help alleviate the battery drain that 7.1 brought with it!

  3. arslion - 10 years ago

    thats awesome !!

  4. fbartolom - 10 years ago

    I tried to execute my location based app on iOS 8 and got the following error:
    Trying to start MapKit location updates without prompting for location authorization. Must call -[CLLocationManager requestWhenInUseAuthorization] or -[CLLocationManager requestAlwaysAuthorization] first.
    I set requestAlwaysAuthorization on the location service as soon as I created it in the ApplicationDidFinishLoading method but sometimes the error happens that setting. Not clear either what callbacks this method uses and how to set the text to show the users.

  5. Why Is Each Word Of That PopUp Message Capitalised?

  6. Rambod Rahmani - 10 years ago

    Here an example how to do it.

    0 – Go to Linked Frameworks […] and add the following two frameworks:

    – MapKit.framework
    – CoreLocation.framework

    1 – Add a MapKit View to you view.

    2 – This is the code for the ViewController.h

    //
    // ViewController.h
    //
    //
    // Created by Rambod Rahmani on 29/07/14.
    // Copyright (c) 2014 Rambod Rahmani. All rights reserved.
    //

    #import
    #import

    @interface ViewController : UIViewController
    {
    CLLocationManager *locationManager;
    }

    @property (weak, nonatomic) IBOutlet MKMapView *mapView;

    @end

    3 – This is the code for the ViewController.m

    //
    // ViewController.m
    //
    //
    // Created by Rambod Rahmani on 29/07/14.
    // Copyright (c) 2014 Rambod Rahmani. All rights reserved.
    //

    #import “ViewController.h”

    @interface ViewController ()

    @end

    @implementation ViewController

    – (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    locationManager = [[CLLocationManager alloc] init];
    [locationManager requestWhenInUseAuthorization];
    [locationManager startUpdatingLocation];

    [_mapView setShowsUserLocation:YES];
    }

    – (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    }

    @end

    5 – ADD two new keys of Type STRING to the Info.plist of your project:

    NSLocationAlwaysUsageDescription
    NSLocationWhenInUseUsageDescription

    And the set the value to:

    “String containing the message to be shown to the user.”

    6 – Result:

    ![enter image description here][1]

    ![enter image description here][2]

    [1]: http://i.stack.imgur.com/J5Esv.png
    [2]: http://i.stack.imgur.com/QceD5.png

  7. Henry Bowman - 9 years ago

    The execution falls far short of the promise. When I wake my iPhone up, I am often presented with a message saying something like, “Application XYZ is monitoring your location in the background. Do you want this to continue?” I am presented with two buttons: one that goes to Settings, and the other which accepts the behavior. When I get to Settings, I have two choices: let the app access my location at all times, or forbid it from accessing my location at all. There is no choice for making the app access my location only when it’s in the foreground. Now I see that unless the app allows for the extra choice provided in iOS 8, the extra security offered can’t actually be enforced on it by iOS 8. I consider it somewhat dishonest for Apple to pretend to offer me a choice that in fact it will not let me make. The dialog box ought to read, “Application XYZ is monitoring your location in the background, and short of cutting it off completely, you’ll have to put up with it.”

Author

Avatar for Jordan Kahn Jordan Kahn

Jordan writes about all things Apple as Senior Editor of 9to5Mac, & contributes to 9to5Google, 9to5Toys, & Electrek.co. He also co-authors 9to5Mac’s Logic Pros series.