Ios6 有人知道如何为iOS 6设置plist的演练或教程吗?
我需要设置plist以允许CLLocation在后台更新当前位置 以下是如何设置地理围栏:Ios6 有人知道如何为iOS 6设置plist的演练或教程吗?,ios6,background,plist,cllocation,Ios6,Background,Plist,Cllocation,我需要设置plist以允许CLLocation在后台更新当前位置 以下是如何设置地理围栏: { self.manager = [[CLLocationManager alloc] init]; self.manager.delegate = self; CLLocationCoordinate2D location; location.latitude = <some lat>; location.longitude = <some long>;
{
self.manager = [[CLLocationManager alloc] init];
self.manager.delegate = self;
CLLocationCoordinate2D location;
location.latitude = <some lat>;
location.longitude = <some long>;
[self.manager startMonitoringForRegion:
[[CLRegion alloc] initCircularRegionWithCenter: location
radius: 1.0
identifier: @"someplace"]];
}
所以我不需要改变plist中的任何东西?是的,但当我去plist改变一些东西时,它不在那里。我不确定这是一个旧的iOS还是我刚刚测试过的;看起来很有效。也许你看了这里:
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
{ NSLog (@"didEnterRegion"); }
- (void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
{ NSLog (@"didExitRegion"); }
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
{ NSLog (@"monitoringDidFailForRegion"); }
- (void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region
{ NSLog (@"didStartMonitoringForRegion"); }