我正在使用重置框架。是否有可能伪造当前位置以用于社交网络应用程序?如果是,那怎么样?
请帮忙。
提前感谢你。
:: Edited ::
我在冲浪之后为此制作了代码,可能是使用类CLLocationManager的重写方法进行更改。 代码如下:
@interface MyHeading : CLHeading
-(CLLocationDirection) newHeading;
-(CLLocationDirection) new1Heading;
@end
@implementation MyHeading
-(CLLocationDirection) newHeading { return 55; }
-(CLLocationDirection) new1Heading { return 56; }
@end
@implementation CLLocationManager (LF)
- (void)setFLocation {
CLLocation *location = [[CLLocation alloc] initWithLatitude:40.778023 longitude:-73.981935];
[[self delegate] locationManager:self didUpdateToLocation:location fromLocation:nil];
id heading = [[MyHeading alloc] init];
[[self delegate] locationManager:self didUpdateHeading: heading];
}
-(void)startUpdatingHeading {
[self performSelector:@selector(setFLocation) withObject:nil afterDelay:0.1];
}
- (void)startUpdatingLocation {
[self performSelector:@selector(setFLocation) withObject:nil afterDelay:0.1];
}
@end
谢谢大家分享。 再次感谢。