Created
May 2, 2020 14:20
-
-
Save valvoline/f8d438e8b4559940af2d094df103cf2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// FakeBeacon.h | |
// | |
// Created by Costantino Pistagna on 02/05/2020. | |
// Copyright © 2020 Sofapps. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
@import CoreLocation; | |
NS_ASSUME_NONNULL_BEGIN | |
@interface FakeBeacon: CLBeacon | |
- (id)initFakeWithUUID:(id)uuid | |
major:(id)major | |
minor:(id)minor | |
proximity:(long long)proximity | |
accuracy:(double)accuracy | |
rssi:(long long)rssi | |
timestamp:(double)timestamp; | |
@end | |
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// FakeBeacon.m | |
// | |
// Created by Costantino Pistagna on 02/05/2020. | |
// Copyright © 2020 Sofapps. All rights reserved. | |
// | |
#import "FakeBeacon.h" | |
@interface CLBeacon() | |
- (id)initWithUUID:(id)arg1 major:(id)arg2 minor:(id)arg3 proximity:(long long)arg4 accuracy:(double)arg5 rssi:(long long)arg6 timestamp:(double)arg7; | |
@end | |
@implementation FakeBeacon | |
- (id)initFakeWithUUID:(id)uuid | |
major:(id)major | |
minor:(id)minor | |
proximity:(long long)proximity | |
accuracy:(double)accuracy | |
rssi:(long long)rssi | |
timestamp:(double)timestamp | |
{ | |
SEL selector = NSSelectorFromString(@"initWithUUID:major:minor:proximity:accuracy:rssi:timestamp:"); | |
if ([self respondsToSelector:selector]) { | |
self = [super initWithUUID:uuid major:major minor:minor proximity:proximity accuracy:accuracy rssi:rssi timestamp:timestamp]; | |
return self; | |
} | |
return nil; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment