ekevent

Missing EKEvents when saving multiple Google calendar events

一个人想着一个人 提交于 2021-02-08 04:57:06
问题 I'm looping through around 100 objects that create an event for each using EventKit. I don't "commit" until all the objects are saved and know a calendarIdentifier is successfully fetched for each. Yet about 10-15% of the events never show on the device calendar or online. This only happens with Google Calendar. iCloud and local work fine. I understood when creating multiple events like this, it was preferable to use: [eventStore saveEvent:event span:EKSpanThisEvent commit:NO error:&error]; .

how to open create event screen in calendar app with populated data in swift? [closed]

末鹿安然 提交于 2020-06-08 04:32:48
问题 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 last month . I have tried to search but most of the answer like in here is to directly save the event to calendar. I want just to open a calendar app with populated data like the image below. so the user can modify the data first before adding a new event to the calendar I want to automatically

How to add some additional fields to EKEvent

那年仲夏 提交于 2020-01-14 14:32:14
问题 One solution could be: Creating a new model EKEventExt and add a One-to-One relationship between them, I'm not sure whether it's doable, since EKEventExt is stored in my one sqlite and EKEvent is stored in eventstore. 回答1: It would be possible to append custom fields to calendar formats such as iCal (like x-my-field ), there is no EKEvent property like .customFields etc. Saying this, unfortunately it's not possible to store your custom data in any fields. It would be possible to create your

why eventsMatchingPredicate returns nil?

江枫思渺然 提交于 2020-01-14 10:38:52
问题 Here's my code: NSString * calID = [[NSUserDefaults standardUserDefaults] objectForKey:@"calendarIdentifier"]; EKCalendar *cal = [eventStore calendarWithIdentifier:calID]; // If calendar exists if(cal) { // Retrieve all existing events until today NSPredicate *predicate = [eventStore predicateForEventsWithStartDate:[NSDate distantPast] endDate:[NSDate date] calendars:@[cal]]; self.events = [eventStore eventsMatchingPredicate:predicate]; if(self.events==nil) NSLog(@"nil events!"); } The

predicateForEventsWithStartDate:endDate:calendars: EKEventStore doesn't work

拜拜、爱过 提交于 2020-01-05 04:55:09
问题 i have saved 28 EKEvent in a EKCalendar in this range date: 2012-01-01 and 2013-01-18, the EKEvent are all stored and i can see it in the iOS Calendar on iCloud, then i want retrieve all this EKEvent in the range 2012-01-01 and 2013-01-18 and i use this method of EKEventStore: predicateForEventsWithStartDate:endDate:calendars: that is a NSPredicate to fetch event in the calendar, i pass with start date 2012-01-01 and with endDate:2013-01-18 so the array that return me with the EKEvent have

EKEvent eventIdentifier returns null

这一生的挚爱 提交于 2020-01-01 10:04:25
问题 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

How to convert a date given as “20110912T220000”(NSString) to NSDate

天大地大妈咪最大 提交于 2019-12-23 22:34:34
问题 I am getting start and end dates for my calendar event(while parsing a .ics file) in "20110912T220000" format. How can I convert this to a NSDate to add to add as event(EKEvent)'s startDate property. If anyone knows please help me soon. 回答1: You should use NSDateFormatter for this. See Data Formatting Guide (the Date & Time Programming Guide may also be interesting) This is also detailed in this Technical Note in Apple's Q&As. Note that for such situations, you should use the special "en_US

EKEvents/EKReminders set but are not displaying on calendar

你说的曾经没有我的故事 提交于 2019-12-23 21:05:46
问题 I am setting events to calendar. The code works throughly but wen I check if the event r set on my device's calendar. It doesnt show anything. I am doing this in ios6, when I do it for ios5, it works fine. 回答1: This worked for me, you can try the same. I had to navigate from one page to another, so posting the link to the two pages. First -> https://discussions.apple.com/message/16497282#16497282 Then, from there to -> https://discussions.apple.com/message/16479587#16479587 I had to go into

EKEvent accept invitation

删除回忆录丶 提交于 2019-12-23 08:28:28
问题 How do you accept an EKEvent invitation in iOS? I know it's possible as Fantastical , Calendars 5 , and other calendar apps have this functionality, but I don't see an exposed non read-only property to change the user's status in regards to an event. Any idea how to do this? Thanks, 回答1: Turns out, after doing some more research, that all of these apps are just displaying the EKEventViewController . What I had mistaken as customization was actually view tints. 来源: https://stackoverflow.com

Objective c customizing EKEventEditViewController

点点圈 提交于 2019-12-23 03:22:47
问题 I am displaying event edit View using this code -(void)editEvent:(EKEvent *)events{ EKEventEditViewController *addController = [[EKEventEditViewController alloc] initWithNibName:nil bundle:nil]; addController.delegate = self; addController.eventStore = [SharedEventStore defaultEventStore]; addController.event = events; [[NSUserDefaults standardUserDefaults] objectForKey:KCalendarIdentifier]]; addController.editViewDelegate = self; addController.navigationBar.barStyle = UIBarStyleDefault;