summaryrefslogtreecommitdiff
path: root/test/ios/LocationMocker/CLLocationManager+MockLocation.h
blob: 48641d0291a6fcf21573b00b38b2f8688b155754 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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