Question

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!

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top