Regionsüberwachung in ios 7

Ich sollte die Regionsüberwachung in meiner iOs App für Version 6 und 7 verwenden. Und wenn meine App geschlossen wurde, sollte das System sie öffnen. Es funktioniert in iOS 6, aber nicht in iOS 7. Ich meine, System öffnet meine App nicht, wenn die App in iOS 7 geschlossen wurde.

Über das Schließen der App, meine ich, töte diese App aus dem Speicher.

Ich benutze diesen Code:

manager = [CLLocationManager new];

manager.delegate = self;

[manager startUpdatingLocation];

if ([UIDevice isIOS7OrHigher]) {

    CLCircularRegion *reg = [[CLCircularRegion alloc] initCircularRegionWithCenter:CLLocationCoordinate2DMake(56.844947, 53.208852) radius:20.f identifier:@"reg14132"];

    [manager startMonitoringForRegion:reg];

    CLCircularRegion *reg1 = [[CLCircularRegion alloc] initCircularRegionWithCenter:CLLocationCoordinate2DMake( 56.844158,53.20913) radius:20.f identifier:@"reg14131232"];

    [manager startMonitoringForRegion:reg1];

} else {

    CLRegion *reg = [[CLRegion alloc]  initCircularRegionWithCenter:CLLocationCoordinate2DMake(56.844947, 53.208852) radius:20.f identifier:@"reg14132"];

    [manager startMonitoringForRegion:reg];

    CLRegion *reg1 = [[CLRegion alloc] initCircularRegionWithCenter:CLLocationCoordinate2DMake( 56.844158,53.20913) radius:20.f identifier:@"reg14131232"];
    [manager startMonitoringForRegion:reg1];
}

Und ich benutze Delegate-Methoden für die Protokollierung. Außerdem benutze ich diesen Code zum Testen

if (launchOptions) {
    UILocalNotification *note = [UILocalNotification new];
    note.alertBody = [NSString stringWithFormat:@"launchOptions = %@", launchOptions];
    [[UIApplication sharedApplication] presentLocalNotificationNow:note];
}

Antworten auf die Frage(1)

Ihre Antwort auf die Frage