summaryrefslogtreecommitdiff
path: root/test/ios/LocationMocker/CLLocationManager+MockLocation.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/ios/LocationMocker/CLLocationManager+MockLocation.h')
-rw-r--r--test/ios/LocationMocker/CLLocationManager+MockLocation.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/ios/LocationMocker/CLLocationManager+MockLocation.h b/test/ios/LocationMocker/CLLocationManager+MockLocation.h
new file mode 100644
index 0000000000..48641d0291
--- /dev/null
+++ b/test/ios/LocationMocker/CLLocationManager+MockLocation.h
@@ -0,0 +1,39 @@
+//
+// Based on gist by Eric Allam
+// https://gist.github.com/ericallam/5689235
+//
+
+#import <CoreLocation/CoreLocation.h>
+
+@interface CLLocationManager (MockLocation)
+
+- (void)custom_startUpdatingLocation;
+- (CLLocation *)custom_location;
+
+- (void)custom_startUpdatingHeading;
+- (CLHeading *)custom_heading;
++ (BOOL)custom_headingAvailable;
+
+@end
+
+// private setter struct for CLHeading
+typedef struct {
+ double x;
+ double y;
+ double z;
+ double magneticHeading;
+ double trueHeading;
+ double accuracy;
+ double timestamp;
+ double temperature;
+ double magnitude;
+ double inclination;
+ int calibration;
+} CLHeadingStruct;
+
+// create reference to private API method
+@interface CLHeading ()
+
+- (id)initWithClientHeading:(CLHeadingStruct)heading;
+
+@end