Location services problem in iOS 8

Location services problem in iOS 8

We will create an app that will fix the location services problem found in iOS 8. In the latest release iOS, some developers found that released apps that used location services stop working.

The sample project

Lets create a new  single view application  project.

Single view application template project for Location services problem in iOS 8

One of the key points for fixing the location services problem in iOS 8 is add one of the two new keys in YourApp-Info.plist file. Open the file as source code and paste the following chunk of xml code.

or

Info-plist file for fixing Location services problem in iOS 8

Then in the view controller class header: import Corelocation header; define that the class will implement CLLocationManager delegate protocol and define an attribute for handling the device location

In the view controller implementation class add the #define:

In the view ViewDidLoad method add the following snippet:

Add the method startUpdationLocation:

And finally implement the protocol method:

If all was set properly didUpdateLocations callback should be called, this is the test that you can succeed with the location services problem in iOS 8:

debugging didUpdateLocations for fixing Location services problem in iOS 8

On the target device

And finally last, but not least be sure that the location services are enabled for your app in the device. Select Settigs >Privacy > Location Services and be sure that your app has this services as Always or While Using.

Some times location services problem in iOS 8, is just that the settings of your app were not properly right.

IPphone_iOS_8_Location_Service maximize-your-iphones-battery-life-ios-8.w654

 

Your can find more information about that issue here.