PDA

View Full Version : CLLocationManager headingAvailable deprected. Any alternatives?




chrono1081
Feb 6, 2012, 02:35 AM
Hi guys,

I'm working through the Big Nerd Ranch iOS Programming Book (again!) and I wanted to implement a check in a part of the code. Unfortunately that check appears to be deprecated and I can't find any alternative in the documentation (if its there and I miss it, please let me know where I can find it so I know where to hunt next time).

The class method I am trying to use is part of CLLocationManager and the method is as follows:

+(BOOL)headingAvailable

I would like to implement this check:

//Is heading info available?
if([locationManager headingAvailable])
{
//Tell manager to update heading
[locationManager startUpdatingHeading];
}

However there doesn't appear to be any alternate methods to do this. I'm assuming maybe because all future devices will be able to use headings but thats just a guess.

Does anyone have any ideas on how to implement this check?



dejo
Feb 6, 2012, 09:29 AM
C'mon, chrono, you're better than this.

Second link from Google search for: ios cllocationmanger headingavailable deprecated

Deprecated CLLocationManager Methods (https://developer.apple.com/library/IOs/#documentation/CoreLocation/Reference/CLLocationManager_Class/DeprecationAppendix/AppendixADeprecatedAPI.html)

chrono1081
Feb 6, 2012, 12:54 PM
C'mon, chrono, you're better than this.

Second link from Google search for: ios cllocationmanger headingavailable deprecated

Deprecated CLLocationManager Methods (https://developer.apple.com/library/IOs/#documentation/CoreLocation/Reference/CLLocationManager_Class/DeprecationAppendix/AppendixADeprecatedAPI.html)

Oooooh I'm an idiot I was using an instance method not a class method. :o Thanks for the help! :)