Files
MapLibreParticleLab/test/ios/LocationMocker/CSSwizzler.h
Jason Wray e75e538ddb Add location tests for iOS
- Adds testDelegatesStartStopLocatingUser: Tests mapViewWillStartLocatingUser and mapViewDidStopLocatingUser delegate methods
- Adds testUserTrackingModeFollow
- Adds testUserTrackingModeFollowWithHeading (disabled because of library bug)

Fakes user location via swizzled CLLocationManager and hard-coded mock coordinates and heading.
2015-06-15 16:42:32 -07:00

23 lines
572 B
Objective-C

//
// Based on gist by Eric Allam
// https://gist.github.com/ericallam/5689235
//
#import <Foundation/Foundation.h>
@interface CSSwizzler : NSObject
+ (void)swizzleClass:(id)cls
replaceClassMethod:(SEL)origMethodSelector
withMethod:(SEL)replacementMethodSelector;
+ (void)swizzleClass:(id)cls
replaceMethod:(SEL)origMethodSelector
withMethod:(SEL)replacementMethodSelector;
+ (void)swizzleClassOfInstance:(id)inst
replaceMethod:(SEL)origMethodSelector
withMethod:(SEL)replacementMethodSelector;
@end