CLLocationManager headingAvailable deprected. Any alternatives?

Discussion in 'iOS Programming' started by chrono1081, Feb 6, 2012.

  1. macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #1
    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:

    Code:
    //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?
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
  3. thread starter macrumors 604

    chrono1081

    Joined:
    Jan 26, 2008
    Location:
    Isla Nublar
    #3
    Oooooh I'm an idiot I was using an instance method not a class method. :eek: Thanks for the help! :)
     

Share This Page