次のコードを使用して、iOSアプリケーションの領域を監視しています。私がiOS6でアプリケーションをビルドすると完全に動作します。 iOS7でビルドすると、didEnterRegionはトリガーされません。iOS 7 didEnterRegionがまったく呼び出されない
//作成とiOS
CLLocationCoordinate2D venueCenter = CLLocationCoordinate2DMake([favoriteVenue.venueLat doubleValue], [favoriteVenue.venueLng doubleValue]);
CLRegion *region = [[CLRegion alloc] initCircularRegionWithCenter:venueCenter radius:REGION_RADIUS identifier:favoriteVenue.venueId];
AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
[appDelegate.locationManager startMonitoringForRegion:[self regionForVenue:favoriteVenue]];
// AppDelegate.mにして地域を登録
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
{
NSLog(@"Entered region: %@", region.identifier);
}
「アプリケーションが位置情報の更新のために登録する」として、私はまた、必要なバックグラウンドモードを設定しています私のplistファイルで。
この機能がiOS7で動作するために欠落していることのアイデアはありますか?
ありがとうございます!