Hi,
ich möchte in einer App Local Notification wenn ein bestimmter Standort erreicht ist senden. Ich habe mir beim LocationManager die Berechtigung geholt das ich immer auf den Standort zugreifen darf und ein Xcode die Berechtigung für die Background Modes auf Location Updates. Zertifikate habe ich keine besondere erstellt.
Für die Notifications verwende ich folgendes:
Trotzdem kommt nichts an bzw. wird keine ausgelöst. Was mache ich denn falsch? Online findet man außer die Apple Doku kaum was. Nutz das denn keiner?
Viele Grüße
Nils
ich möchte in einer App Local Notification wenn ein bestimmter Standort erreicht ist senden. Ich habe mir beim LocationManager die Berechtigung geholt das ich immer auf den Standort zugreifen darf und ein Xcode die Berechtigung für die Background Modes auf Location Updates. Zertifikate habe ich keine besondere erstellt.
Für die Notifications verwende ich folgendes:
C-Quellcode
- UILocalNotification *localNotification = [[UILocalNotification alloc] init];
- localNotification.alertBody = @"Test";
- localNotification.regionTriggersOnce = YES;
- localNotification.region = [[CLCircularRegion alloc] initWithCenter:CLLocationCoordinate2DMake([marker.locationLat floatValue], [marker.locationLong floatValue]) radius:100 identifier:[NSString stringWithFormat:@"%li", (long)marker.markerID]];
- [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
Viele Grüße
Nils