ekevent

saveEvent returning “No calendar has been set”

纵然是瞬间 提交于 2019-12-07 06:05:52
问题 I am attempting to save an event into the calendar, from my application. My code works for iOS 7, but on iOS 6 , it returns No calendar has been set. The application prompts for user to grant access to the calendar, on iOS 7. But no such prompt appears for iOS 6. Although the application is granted access in the Settings-> Privacy -> Calendar. And yes, I have already implemented the requestAccessToEntityType:completion: . Here is my code snippet . EKEventStore *objStore = [[EKEventStore alloc

EKEventStore getting events returns empty list

社会主义新天地 提交于 2019-12-06 18:39:08
问题 I want to get all events from a specific calendar in my app. I created the calendar and the test events in my app (needs iOS 5.0 or later for creating custom calendars). If I run the app on my device and then check the system calendar app then my calendar and my created events are shown correctly. Now I want my app to read all those events out of this custom calendar. My events are created with startDate and endDate set to NOW (NSDate alloced with no timeInterval given). NSDate *startDate =

Create a calendar in iOS [closed]

淺唱寂寞╮ 提交于 2019-12-06 14:13:21
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have an app which I need to create a calendar to save events that are created by said application. The calendar should be used only inside the app but could have the option to sync to the default calendar. Searched tutorials but none explain this process in a very good way, so

Deleting an event using Event Kit in iPhone

大兔子大兔子 提交于 2019-12-06 06:52:41
I am using Event Kit in my iOS application and creating a event using Event Kit. I am able to create it but I want to give the ability to delete also. But I am not able to do that. I know there is a method for EKEventStore to delete event but I am not able to make event object. I have event identifier as a string but I am not able to create an event object using it. Can someone please guide me to do it? Regards Pankaj Sonu When ever you are creating an event save its id like this: NSString* str = [[NSString alloc] initWithFormat:@"%@", event.eventIdentifier]; pass the id to delete the event,

saveEvent returning “No calendar has been set”

空扰寡人 提交于 2019-12-05 15:36:18
I am attempting to save an event into the calendar, from my application. My code works for iOS 7, but on iOS 6 , it returns No calendar has been set. The application prompts for user to grant access to the calendar, on iOS 7. But no such prompt appears for iOS 6. Although the application is granted access in the Settings-> Privacy -> Calendar. And yes, I have already implemented the requestAccessToEntityType:completion: . Here is my code snippet . EKEventStore *objStore = [[EKEventStore alloc]init]; if ([objStore respondsToSelector:@selector(requestAccessToEntityType:completion:)]) { // iOS 6

EKEventStore getting events returns empty list

浪尽此生 提交于 2019-12-04 23:42:25
I want to get all events from a specific calendar in my app. I created the calendar and the test events in my app (needs iOS 5.0 or later for creating custom calendars). If I run the app on my device and then check the system calendar app then my calendar and my created events are shown correctly. Now I want my app to read all those events out of this custom calendar. My events are created with startDate and endDate set to NOW (NSDate alloced with no timeInterval given). NSDate *startDate = [NSDate dateWithTimeIntervalSinceNow:- 60 * 60 * 24 * (365 * 4 + 1)]; NSDate *endDate = [NSDate

Deleting an EKEvent from device's calendar using its identifier

冷暖自知 提交于 2019-12-04 19:14:38
I am creating EKEvent, saving it and saving its identifier as well. I wanna access this identifier and delete the specific Event. I am able to retrieve the proper Identifier from database. However, the Event isn't getting deleted from my Device's calendar. My code to delete the event : `NSError* err; EKEvent *myEvent = [EKEvent eventWithEventStore:homeobj.eventDB]; myEvent = [homeobj.eventDB eventWithIdentifier:[dbObj selectEventIdentifier:mypass]]; [homeobj.eventDB removeEvent:myEvent span:EKSpanThisEvent commit:YES error:&err]; ` For deleting use this code -(void)removeMeWithIndex:(int)index

EKEvent eventIdentifier returns null

和自甴很熟 提交于 2019-12-04 06:06:20
When I try to get the identifier of an EKEvent, all I get is a nil value. Since in iOS5 EKEvent is a subclass of EKCalendarItem, I figured I might be able to get the EKCalendarItem's UUID, but that returns nil as well. Every now and then I also get this error while trying to access the identifier or UUID property: CADObjectGetInlineStringProperty failed fetching uniqueID for EKPersistentEvent with error Error Domain=NSMachErrorDomain Code=268435459 "The operation couldn’t be completed. (Mach error 268435459 - (ipc/send) invalid destination port)" I've been stuck on this problem for quite some

how can i set array in EKRecurrenceRule for day of the week?

a 夏天 提交于 2019-12-04 06:04:23
问题 i want to add event on every week in specific day selected by user. it can be one or more or may be all day. i'm storing day value selected by user in model class variable. But when i adding event and select days suppose today is monday and i select Tuesday and Wednesday and save it. then i check in iphone calendar it added in Monday and Wednesday. i cant understand this problem, even i debug my code i get right value for day selection in model class variable then why result different ?

How to detect which EKevent was changed

送分小仙女□ 提交于 2019-12-03 21:29:20
问题 I got the problem. I need to know when Events in my EventStore are changed, so for this case I use EKEventStoreChangedNotification but this notification return to me incomprehensible dictionary in userInfo It's look like this: EKEventStoreChangedObjectIDsUserInfoKey = ("x-apple-eventkit:///Event/p429" ); I don't know how I can use this data to taking access for changed object. Please help me 回答1: This will detect changed events and log the event titles over a date range. Although, I ended up