newuser
newuser

Reputation: 23

'[CLLocationManager headingAvailable]' returning FALSE

I am having some issues with the following.

CLLocationManager headingAvailable

This always returns false meaning that the heading never updates (the function doesn't run at all) while the 'didUpdateToLocation' works perfectly.

I am using the iPhone 6.1 simulator. The strange thing is the locations work, I am able to get the long/lat just not the heading.

Any help would be greatly appreciated - Thanks!

Upvotes: 1

Views: 435

Answers (2)

Guy
Guy

Reputation: 361

Have you set these variables in your plist ?

Extract from apple documentation :

For direction-related events, you can associate two relevant strings with the UIRequiredDeviceCapabilities key:

magnetometer—Include this string if your app requires heading information.

gps—Include this string if your app requires course-related information.

Upvotes: 0

Duncan C
Duncan C

Reputation: 131418

The simulator does not support all hardware functions that devices do. I believe that heading is one of those functions that is not supported on the sim. You will need to use a device to test that.

Upvotes: 1

Related Questions