I have used Core location framework to receive my GPS coordinates in my IPOD.First time i can get the Latitude and longitude, then i got an error message , kCLErrorDomain Code=0 Operation Could not be completed.
But the error message never change.I think first time only it works
This is My code
#import "CoreLocationDemoViewController.h"
@implementation CoreLocationDemoViewController
@synthesize CLController;
- (void)viewDidLoad {
[super viewDidLoad];
CLController = [[CoreLocationController alloc] init];
CLController.delegate = self;
[CLController.locMgr startUpdatingLocation];
}
- (void)locationUpdate:(CLLocation *)location {
speedLabel.text = [NSString stringWithFormat:@"SPEED: %f", [location speed]];
latitudeLabel.text = [NSString stringWithFormat:@"LATITUDE: %f", location.coordinate.latitude];
longitudeLabel.text = [NSString stringWithFormat:@"LONGITUDE: %f", location.coordinate.longitude];
altitudeLabel.text = [NSString stringWithFormat:@"ALTITUDE: %f", [location altitude]];
errorLabel.text = @"";
}
- (void)locationError:(NSError *)error {
if(!CLController) //.text )
{
errorLabel.text = [error description];
}
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return YES;
}
- (void)viewDidUnload {
}
- (void)dealloc {
[CLController release];
[super dealloc];
}
@end
Anybody know what are the issues, help is highly appreciated.
Thanks,
VKS
Yes iPod doesn’t have GPS functionality. Test your app either in simulator or iPhone not on iPod.