user487257
user487257

Reputation: 1141

CLLocationManager requestWhenInUseAuthorization errors with no known class method

I just changed my target version for the app to iOS 8 and updated my XCode to 6.0 version. When I build I see a bunch of methods are getting marked as deprecated which confirms that I am actually building against iOS 8.0 but when I try to call [CLLocationmanager requestWhenInUseAuthorization], I get a build error saying No known class method for selector 'requestWhenInUseAuthorization'

Am I missing something here ?

Upvotes: 1

Views: 838

Answers (1)

James Frost
James Frost

Reputation: 6990

requestWhenInUseAuthorization is an instance method, not a class method - create a CLLocationManager instance, and call the method on that.

See the docs for more info.

Upvotes: 5

Related Questions