【发布时间】:2015-03-27 08:50:24
【问题描述】:
当我在 iOS 7 设备上运行时,我在我的静态库中使用 CLLocationManagerDelegate 一切正常,但是当我在另一台使用 iOS 8.1.3 的设备上测试它时,委托方法没有被调用。 我做了一个强大的财产 @property(非原子,强)CLLocationManager locationManager 我还在 info.plist 中添加了适当的键和字符串值 (NSLocationAlwaysUsageDescription, requestAlwaysAuthorization) 这是我的实例
self.locationManager = [[CLLocationManager alloc] init];
[self.locationManager setDelegate:self];
self.locationManager.distanceFilter = kCLDistanceFilterNone;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[self.locationManager startUpdatingLocation];
[self.locationManager requestWhenInUseAuthorization];
[self.locationManager requestAlwaysAuthorization];
if([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
}
[self.locationManager startUpdatingLocation];
请帮助我找出为什么没有调用委托方法! 为什么我没有收到位置更新??
【问题讨论】:
标签: ios objective-c location static-libraries cllocationmanager