0
我添加了查找位置的代码,这是在模拟器上工作,但它不适用于iPhone设备。我已启用位置服务,但仍然无法正常工作。无法在iPhone设备上找到位置
-(void)firstTimeRefresh {
CLLocation *bestLocation = [[[AppDelegate getAppDelegate] locationManager] bestLocation];
if (bestLocation != NULL) {
NSLog(@"Using Best Loaction");
[self getArray: [NSArray arrayWithObjects: [NSNumber numberWithFloat:bestLocation.coordinate.latitude],
[NSNumber numberWithFloat: bestLocation.coordinate.longitude], nil] :@"false":page_no];
}
}
它仍然不能正常工作 – Pallavi 2012-07-12 07:48:31
你正在运行的模拟器或设备的代码? – 2012-07-12 07:54:22
代码在模拟器上正常运行,但没有在设备上安装该应用程序 – Pallavi 2012-07-12 09:02:25