I am aware there is now a way to simulate location, but is there a way to simulate compass values?.
Compass is not in the list of the hardware interactions supported by the simulator and CLLocationManager headingAvailable reports it's not available on the simulator.
Also, in this doc:
http://developer.apple.com/library/ios/#documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html
Some location services require the presence of specific hardware on the given device. For example, heading information is available only for devices that contain a hardware compass. This class defines several methods that you can use to determine which services are currently available.
Specifically CLLocationManager has this class property to check if the compass is available:
+ (BOOL)headingAvailable
If I run this under the simulator:
NSLog(@"headingAvailable: %d", (int)[CLLocationManager headingAvailable]);
Outputs:
2011-11-08 22:38:26.873 Craplet[39975:b603] headingAvailable: 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With