mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-08-31 09:45:24 +02:00
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JZk5y4Fzw811WJoNWZb8Sc
38 lines
934 B
Plaintext
38 lines
934 B
Plaintext
#import "LocationHelper.h"
|
|
|
|
@interface LocationHelper()
|
|
@end
|
|
|
|
@implementation LocationHelper
|
|
|
|
-(id) init {
|
|
NSLog(@"LocationHelper::init");
|
|
self = [super init];
|
|
if (self) {
|
|
locationManager = [[CLLocationManager alloc] init];
|
|
[locationManager setDelegate:self];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
-(void) startLocationUpdates {
|
|
NSLog(@"LocationHelper::startLocationUpdates");
|
|
if ([locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) {
|
|
[locationManager requestWhenInUseAuthorization];
|
|
}
|
|
[locationManager startUpdatingLocation];
|
|
}
|
|
|
|
-(void) stopLocationUpdates {
|
|
NSLog(@"LocationHelper::stopLocationUpdates");
|
|
[locationManager stopUpdatingLocation];
|
|
}
|
|
|
|
- (void) locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations {
|
|
for (id location in locations) {
|
|
[self.delegate SetGpsDataIOS:location];
|
|
}
|
|
}
|
|
|
|
@end
|