1、在info.plist 里边添加两个key值
NSLocationAlwaysUsageDescription
NSLocationWhenInUseDescription
2、代码 在刷新位置前先请求服务
#define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >=8.0)
if(IS_OS_8_OR_LATER)
{
[self.locationManager requestAlwaysAuthorization];
}
[self.locationManagerstartUpdatingLocation];