2011-10-04 8 views
10

¿Hay alguna manera de agregar, leer o eliminar elementos de recordatorio de la nueva aplicación de recordatorios integrada iOS 5?¿Es posible interactuar con la aplicación Reminders de iOS 5 desde mi aplicación?

+0

gran pregunta. Intenté hacer esto hace un par de meses pero fallé. Espero que Apple abra esto para que todas las aplicaciones puedan publicar recordatorios. (eBay: la subasta termina el 10/12 a las 5:34 pm; Amazon: su pedido llegará el 10/6 ...) – mahboudz

+0

sí, esto definitivamente tiene un gran potencial. – bijan

+1

La respuesta elegida de Bill Burgess ahora está obsoleta, y la respuesta de Patrick ahora es la correcta. – DenNukem

Respuesta

0

No creo que esto sea posible. No hay una API pública que esté disponible para los desarrolladores.

3

Los recordatorios no están en una API pública. Las "geocercas" que se crean son visibles para algunos procesos (he visto el recuento de vallas en los registros de la consola) pero de ninguna manera son accesibles para otra aplicación. Solo puedes registrar vallas en tu propia aplicación.

+1

Entonces, ¿cómo funciona OmniFocus ?: http://vimeo.com/32334380 – an0

0

Realmente me gustaría acceso a los recordatorios también, me encontré con un explaninf después de añadir eventos al calendario aquí ..

Programmatically add custom event in the iPhone Calendar

Mientras que el calendario es "ok" para los recordatorios, tiene más para usar la aplicación "Recordatorios" de IOS 5, ¡después de todo SIRI puede usarla! : P

EDIT: He resuelto mi problema mediante el uso de Notificaciones locales ....

UILocalNotification *localNotif = [[UILocalNotification alloc] init]; 
if (localNotif == nil) 
    return nil; 
localNotif.fireDate = itemDate; 
localNotif.timeZone = [NSTimeZone defaultTimeZone]; 

// Notification details 
localNotif.alertBody = @"Here is your alert!"; 

// Set the action button title 
localNotif.alertAction = @"View"; 

//localNotif.soundName = UILocalNotificationDefaultSoundName; 
localNotif.soundName = @"Bell.aiff"; 
localNotif.applicationIconBadgeNumber = 1; 

// Specify custom data for the notification 
NSDictionary *infoDict = [NSDictionary dictionaryWithObject:myCustomMessage.text forKey:@"message"]; 
localNotif.userInfo = infoDict; 

// Schedule the notification 
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif]; 

Esto me permite establecer notificaciones que aparecen como notificaciones Push y se conservan incluso si se reinicia la aplicación.

puede borrar si es necesario con ..

[[UIApplication sharedApplication] cancelAllLocalNotifications]; 

plasma

0

Puedo ayudarlo con el disparador al llegar a una ubicación predefinida. aquí está el código.

1: CoreLocation.framework importación

2: en el archivo viewController.h lugar por debajo de código

#import <UIKit/UIKit.h> 
#import <CoreLocation/CoreLocation.h> 
@interface ViewController : UIViewController<CLLocationManagerDelegate> 
@end 

3: inviewController.m

#import "ViewController.h" 
@interface ViewController(){ 
CLLocationManager *locationManager; 
CLRegion *mexicoBoundary; 
} 

@end 

@implementation ViewController 

- (void)viewDidLoad 
{ 
    [super viewDidLoad]; 

locationManager = [[CLLocationManager alloc] init]; 
[locationManager setDelegate:self]; 
[locationManager setDistanceFilter:kCLDistanceFilterNone]; 



CLLocationCoordinate2D regionCords ; 
//19.432608,-99.133208 lat, lon for mexico city 
regionCords=CLLocationCoordinate2DMake(19.432608,-99.133208); 
//5000 below, is in meters-radius 
mexicoBoundary = 
[[CLRegion alloc]initCircularRegionWithCenter:regionCords 
             radius:5000.0 
            identifier:@"mexico_Day"]; 

[locationManager startMonitoringForRegion:mexicoBoundary]; 

} 

-(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region 
{ 
NSLog(@"%@: %@", @"region entered", region.identifier); 

} 

-(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region 
{ 
NSLog(@"%@: %@", @"region exited", region.identifier); 
} 



- (void)didReceiveMemoryWarning 
{ 
    [super didReceiveMemoryWarning]; 
    // Dispose of any resources that can be recreated. 
} 

@end 
Cuestiones relacionadas