【发布时间】:2013-01-21 15:54:14
【问题描述】:
自从 6.1 更新以来,我只能反转所有包含 CLLocation 信息的照片的前 25%。
在前 25% 之后,我得到所有其他的:Error Domain=kCLErrorDomain Code=2 "The operation could not be completed. (kCLErrorDomain error 2.)"。
我正在处理所有图像,所以我是否过于频繁地调用服务太快了?但在任何地方都没有提到这方面的限制:S
代码
CLLocation *location = [asset valueForProperty:ALAssetPropertyLocation];
if(location != nil){
CLGeocoder * geoCoder = [[CLGeocoder alloc] init];
[geoCoder reverseGeocodeLocation:location completionHandler:^(NSArray *placemarks, NSError *error)
{
if(placemarks.count == 0){
// this happens with more than 75% of the photos
return;
}
// this only happens with the other 25%
}];
}
谢谢!
【问题讨论】:
标签: ios geolocation cllocation clgeocoder