作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
<分区>
EKReminder *reminder = [EKReminder reminderWithEventStore:self.eventStore];
reminder.title = @"E-Cold 1mg";
reminder.calendar = [_eventStore defaultCalendarForNewReminders];
NSDate *date = [_myDatePicker date];
// get today date
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; // here we create NSDateFormatter object for change the Format of date..
[dateFormatter setDateFormat:@"YYY-MM-dd"]; //Here we can set th
NSLog(@"%@",[dateFormatter stringFromDate:date]);
EKAlarm *alarm = [EKAlarm alarmWithAbsoluteDate:date];
[reminder addAlarm:alarm];
//EKRecurrenceFrequency频率;
NSError *error = nil;
[_eventStore saveReminder:reminder commit:YES error:&error];
if (error)
{
NSLog(@"error = %@", error);
}`
上面的代码设置为闹钟很好但是当我重置模拟器时调用此方法显示此错误错误获取新提醒的默认日历:
Error Domain=EKCADErrorDomain Code=1013 "The operation couldn’t be completed. (EKCADErrorDomain error 1013.)"
error = Error Domain=EKErrorDomain Code=1 "No calendar has been set." UserInfo=0x7f8fca4eac80 {NSLocalizedDescription=No calendar has been set.}
然后再次停止并构建运行良好的应用程序。为什么第一次启动时会出现此错误
这个问题在这里已经有了答案: defaultCalendarForNewEvents failed (8 个答案) 关闭 7 年前。 EKReminder *reminder = [EKRemind
在我的 iOS 应用程序中,我曾经使用以下方法访问日历: EKCalendar* cal = [eventStore calendarWithIdentifier:[calendarIDs objec
创建日历事件对我来说效果很好,编辑已经存在的事件会导致问题。当我尝试将 eventWithIdentifier 用于 EKEventStore 对象的实例时,它会注销他的错误: 获取标识符为 5E5E
对日历守护程序的谓词调用失败:错误域=EKCADErrorDomain 代码=1013“操作无法完成。(EKCADErrorDomain 错误 1013。)” 我正在尝试从默认应用中获取提醒。 if(
我有一个使用日历的应用程序。 该项目直到今天都运行良好。我试图在同一台设备上运行应用程序,但出现错误: Predicate call to calendar daemon failed: Error
我有一个应用程序可以将日历列表加载到选择器 View 中。它可以工作,但只有在应用程序崩溃并再次打开后才能工作。我不确定为什么它在应用程序的初始打开时不起作用。 日历权限请求: func reques
我是一名优秀的程序员,十分优秀!