是否可以从我的应用程序与iOS 5的Reminders应用程序进行交互?

时间:2022-11-11 22:58:58

Is there a way to add, read, or delete reminder items from the new iOS 5 built-in Reminders app?

有没有办法从新的iOS 5内置Reminders应用程序添加,阅读或删除提醒项目?

5 个解决方案

#1


1  

This will be all possible with iOS 6! :)

这将是所有可能的iOS 6! :)

https://developer.apple.com/technologies/ios6/

https://developer.apple.com/technologies/ios6/

At the time of writing this answer was sufficient. To keep it updated here is a tutorial which looks very useful for anyone developing an app which interacts with the native reminders app: Using iOS 6 Event Kit to Create Date and Location Based Reminders

在撰写本文时,这个答案已经足够了。要在这里更新它是一个教程,对于开发与本机提醒应用程序交互的应用程序的人来说非常有用:使用iOS 6事件工具包创建基于日期和位置的提醒

#2


3  

The reminders are not on a public API. The "geofences" that are created are visible to some processes (I've seen the fence count in console logs) but in no way accessible to another app. You are only able to register fences to your own app.

提醒不在公共API上。创建的“地理围栏”对于某些进程是可见的(我已经在控制台日志中看到了围栏计数)但是其他应用程序无法访问。您只能将围栏注册到自己的应用程序。

#3


0  

I do not believe this is possible. There is no public API that is available for developers.

我不相信这是可能的。没有可供开发人员使用的公共API。

#4


0  

I'd really like access to the reminders too, I found a post explaninf adding events to the calendar here ..

我也非常想要访问提醒,我发现了一个帖子解释,在这里向日历添加事件。

Programmatically add custom event in the iPhone Calendar

以编程方式在iPhone日历中添加自定义事件

While the Calendar is "ok" for reminders, it makes more sence to use the IOS 5 "Reminders" app, after all SIRI can use it! :p

虽然日历对于提醒是“正常的”,但是在所有SIRI都可以使用它之后,它会更有意义地使用IOS 5“提醒”应用程序! :p

EDIT: I solved my problem by using Local Notifications....

编辑:我通过使用本地通知解决了我的问题....

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];

This allows me to set notifications which appear like Push Notifications and they are preserved even when the app is restarted.

这允许我设置看起来像推送通知的通知,即使重新启动应用程序也会保留这些通知。

You can clear them if needed with ..

如果需要,你可以清除它们..

[[UIApplication sharedApplication] cancelAllLocalNotifications];

Plasma

等离子体

#5


0  

I can help you out with the trigger on arriving on predefined location. here is the code.

到达预定位置时,我可以帮助您解决触发问题。这是代码。

1: import CoreLocation.framework

1:导入CoreLocation.framework

2: in viewController.h file place below code

2:在viewController.h文件中放置代码

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

3: inviewController.m

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

#1


1  

This will be all possible with iOS 6! :)

这将是所有可能的iOS 6! :)

https://developer.apple.com/technologies/ios6/

https://developer.apple.com/technologies/ios6/

At the time of writing this answer was sufficient. To keep it updated here is a tutorial which looks very useful for anyone developing an app which interacts with the native reminders app: Using iOS 6 Event Kit to Create Date and Location Based Reminders

在撰写本文时,这个答案已经足够了。要在这里更新它是一个教程,对于开发与本机提醒应用程序交互的应用程序的人来说非常有用:使用iOS 6事件工具包创建基于日期和位置的提醒

#2


3  

The reminders are not on a public API. The "geofences" that are created are visible to some processes (I've seen the fence count in console logs) but in no way accessible to another app. You are only able to register fences to your own app.

提醒不在公共API上。创建的“地理围栏”对于某些进程是可见的(我已经在控制台日志中看到了围栏计数)但是其他应用程序无法访问。您只能将围栏注册到自己的应用程序。

#3


0  

I do not believe this is possible. There is no public API that is available for developers.

我不相信这是可能的。没有可供开发人员使用的公共API。

#4


0  

I'd really like access to the reminders too, I found a post explaninf adding events to the calendar here ..

我也非常想要访问提醒,我发现了一个帖子解释,在这里向日历添加事件。

Programmatically add custom event in the iPhone Calendar

以编程方式在iPhone日历中添加自定义事件

While the Calendar is "ok" for reminders, it makes more sence to use the IOS 5 "Reminders" app, after all SIRI can use it! :p

虽然日历对于提醒是“正常的”,但是在所有SIRI都可以使用它之后,它会更有意义地使用IOS 5“提醒”应用程序! :p

EDIT: I solved my problem by using Local Notifications....

编辑:我通过使用本地通知解决了我的问题....

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];

This allows me to set notifications which appear like Push Notifications and they are preserved even when the app is restarted.

这允许我设置看起来像推送通知的通知,即使重新启动应用程序也会保留这些通知。

You can clear them if needed with ..

如果需要,你可以清除它们..

[[UIApplication sharedApplication] cancelAllLocalNotifications];

Plasma

等离子体

#5


0  

I can help you out with the trigger on arriving on predefined location. here is the code.

到达预定位置时,我可以帮助您解决触发问题。这是代码。

1: import CoreLocation.framework

1:导入CoreLocation.framework

2: in viewController.h file place below code

2:在viewController.h文件中放置代码

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

3: inviewController.m

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