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.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

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

  1. Stuart Steel says:

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

  2. arslion says:

    thats awesome !!

  3. fbartolom says:

    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.

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

  5. 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