ios如何在xcode上检测gps篡改,它在xcode上有“模拟定位”,有没有办法检测由它引起的gps篡改?
发布于 2021-10-20 12:46:18
xcode的调试输出区有一个名为“simulator”的按钮,它允许您模拟不同国家的位置,当您使用CLLocation获取位置时,它将输出模拟器选择的国家的位置。
CLLocationManager *manager = [[CLLocationManager alloc] init];
[CLLocationManager authorizationStatus];
manager.delegate = self;
manager.desiredAccuracy = kCLLocationAccuracyBest;
[manager requestAlwaysAuthorization];
[manager startUpdatingLocation];
if( [CLLocationManager locationServicesEnabled] ) {
CLLocation *location = [manager location]; //maybe other country
NSLog(@"%@", location);
}https://stackoverflow.com/questions/69642483
复制相似问题