Not every EKEvent shows up in Calendar after saving multiple events - ios

I'm inserting events into my Calendar, and just saw that not every event gets saved.
One day I should have 3 events saved, but only the first and the last shows up in the calendar. I've printed the results, no error occurs when I save the events in the eventStore.
Steps:
Have a loop creating EKEvents and saving them in the EventStore with commit:false, then after finished call commit() on the EventStore.
I get no errors, but missing some events in the Calendar, any ideas how to find the source of this problem?
Thank you in advance!

Related

Swift Recurring Event - Delete only a single event which is part of recurring events

I'm struggling with deleting a single event of a recurring event series.
In this case I set up a weekly recurring event and tried to delete one event with the following code:
let event = self.eventStore.event(withIdentifier: eventID)
try! self.eventStore.remove(event, span: EKSpan.thisEvent)
The result was that the first event of the occurrence has been deleted (not the third occurrence I selected). Am I missing something?

Get notification from Microsoft Graph when deleting event occurrence

I have subscribed to events (https://outlook.office.com/api/v2.0/me/events) push notification.
When I delete one event of recurrence master event, I receive UPDATED notification with id of master event and not specific occurrence event id.
How can I know which event was deleted without comparison with all previous recurrence events? And not receive only master id event.
When you "delete" and occurrence, you're technically not deleting an entity. You're actual adding an exception to the master's recurrence pattern. This is why you're receiving a notification that the master was updated rather than a notification that an event was deleted.
You can see the list of event occurrences and exceptions by calling the /instances. This will return a collection of event objects for a given master. You can determine if an object is an occurrence or an exception by looking at the type property (possible values are SingleInstance, Occurrence, Exception, or SeriesMaster).

FullCalendar - Prevent reloading of events from JSON source on month change

Is there a way to prevent FullCalendar from re-fetching events from a JSON source when you change month?
The JSON source provides the initial list of events which can then be edited on the client side using: $('#calendar').fullCalendar('updateEvent', event); However changing month causes the events to be reloaded from the server, replacing the changed events with the original values.
I've tried setting stick to true in the event data from the JSON source, I've also tried setting cache to true when adding the event data source. I've left lazyFetching as true.
I guess a workaround would be to retrieve the JSON and add this as an array data source rather than a JSON data source..
No. There isn't a way to prevent refetching.
lazyFetch is for a smaller scope on the data that already cached (changing the view from month to week - the data is already in the client).
I'm not sure what you are trying to do.
how do you save changes when the user is happy?
I think the best practice in that case is to have a list of changes that uses both for a final approval when the user is happy and for re-rendering the calendar after the calendar re-fetch events when navigating.
add a listener to the refetch events and then change the events that the user changed earlier.

How do I check for duplicates in event calendar eventkits

I fetched a list of all events and try to match it with my current events about to be added, but it never matches and just add duplicates.
The code I used to fetch is from apple's document. Can anyone help?
http://developer.apple.com/library/ios/#documentation/DataManagement/Conceptual/EventKitProgGuide/ReadingAndWritingEvents.html#//apple_ref/doc/uid/TP40004775-SW1
Code from another tutorial (I scourged the net but couldn't find how to match events. the fetch predicates results title string comparison did not work)
http://neilang.com/entries/using-eventkit-in-ios/
I found out that one can save the eventstore event unique identifier immediately after saving. And with this identifier one can get the events back.

Delete single occurrence of recurring event in blackberry calendar programmatically

I want to know how to delete a single occurrence of recurring calendar event programmatically.
Using eventList.removeEvent(event) deletes the whole series from the calendar.
I have also tried getting enumeration from eventList.items(BlackberryEventList.OCCURRING, startDate, endDate, true) and then deleting the event whose start date and end date is matched but still it deletes the whole series. According to the api this function should return me the first instance of recurring event when I specify true in the last parameter.
Instead of removing event try to update repeat rule of the particular event.
Take a look at the following methods/classes:
setRepeat() method of Event class
RepeatRule class
addExceptDate() method of RepeatRule class

Resources