I am using Event Kit to read and create events. I want to be able to add attendees to such events. But as described in documentation we cannod do that with Event Kit framework:
Event Kit provides limited access to a user’s Calendar database; it
does not include everything that would be desired for implementing a
full-featured calendar or reminder app, such as adding attendees or
accounts (Link to the source)
I see that some apps, like Google Calendar, can do that. I think that they are using CalDAV protocol, but I could not find anything about that (documentation, tutorials, other helpfull resources) and I don't know where to start.
Any help would be welcome.
Thanks
UPDATE:
Possible duplicate of:
Add participant to an event in iOS
Anyway, I will try to post here my research updates.
Related
I've been trying to look for the answer to this quite some time.
Apple EventKit documentation isn't allowing changing meeting invitees programmatically since those properties in an EKEvent are read-only.
I'm trying to find a way to create a calendar meeting (not necessary using EventKit), adding invitees to the meeting and setting it programatically.
Any solution will be great,
Thanks!
As you already figured out you cannot currently write meeting fields in iOS (AFAIK EventKit is the only API giving you access to the calendar database on iOS).
If you know what kind of account it is (and get the credentials from the user), you could sidetrack EventKit and directly create meetings on the server. Eg using EWS when the account is on Exchange or CalDAV when the account is on iCloud or Apple Calendar Server etc.
And finally you always have the option to send out meeting invites via iMIP. Though you would still need to get the event into the users calendar (so that replies have a target). Depends on your useless whether this is useful.
I'm building a really simple App that needs to update its database following some users choices. Imagine a simple App for personal finances where users define some recurring transactions.
I'm trying to figure out which could be the best way to implement this feature.
I suppose that working with EventKit could be a good solution, but I can't understand if the events that I'm going to add through this framework are at the end also displayed into users calendar (which is a behaviour that I don't want).
So my question is which is in your opinion the best way to perform recurring events for an Application, without let the user know about that? (obviously through the application users can edit/remove/add these events).
Well EventKit is the SDK that allows you to interact with the user calendar, so any thing you add the calendar will be visible in the users calendar.
If you don't want you event to show in the users calendar then don't use EventKit. Just store all the event in a local database and use UILocalNotification to alert the user.
From an app, is there a way to programmatically create a calendar with events that are uneditable? Or, what is the best way to achieve this as close as possible?
For example, Facebook events have a unique "Event Details" screen with their custom details. The user cannot edit the event from iCal, but instead have to click "View on Facebook".
1) I've explored creating local calendars and iCloud calendars but the user can easily edit the events and the calendars, including removing them, from iCal.
2) From the app, I cannot seem to create a new EKSource to have total control of the calendars I create in that source. Creating a new calendar in the existing CalDAV source also doesn't make it appear.
3) The EKCalendar class has an allowsContentModifications property, but it is readonly and cannot be modified.
Official response from Apple Developer Technical Support:
Our engineers have reviewed your request and have concluded that there
is no supported way to achieve the desired functionality given the
currently shipping system configurations.
So as of right now there isn't a way to do this.
I've searched the iCalendar spec https://www.rfc-editor.org/rfc/rfc5545 and the CalDAV spec https://www.rfc-editor.org/rfc/rfc4791 looking for insight on how to mark an event that is sent from our calendar server to an iPhone as "read-only" (non-editable) when the iPhone connects to our server using the CalDAV protocol. But the answer is not jumping out at me.
In other words, the iPhone user is receiving, via a CalDAV account a bunch of events. Normally, they can edit any of these events. However, we want to be able to mark a few as read-only. I know that we can use the iPhone ability to add an .ics subscription account, but we don't really want to do this, because it requires the iPhone user to add BOTH a CalDAV and an .ics subscription account.
We are using SabreDAV as our CalDAV server.
My technical co-worker has asked me to look into this, so I am asking for help from the Stackoverflow community.
Any help or hints will be greatly appreciated.
Once you've sent the file to the user it's theirs to deal with so...
I would say there isn't a way to protect the appointment/event from modification.
What you can however do is host the whole calendar yourself and if the user has Outlook or similiar, to subscribe to that RSS feed.
It's one idea... but for protecting what you send them? Highly doubtful. Just take heart they are only modifying their copy of your data, not the source data itself.
1/ You can use shared calendars and invite the user as a read-only. However, the user will have 2 calendars: its own and the shared calendar. Still, it's the same CalDAV account so the user has just one checkbox to click to opt in.
2/ I've not tried ACL but maybe you can play with it.
3/ As a dirtly last resort, you can edit Sabre\CalDAV\Backend\PDO::updateCalendarObject and deleteCalendarObject and add your conditions. But that's very low-level at this point (this class doesn't even know who's doing the change). I don't recommend it.
I am quite new to iOS, and I would appreciate if you can give me a clue on how to tackle this issue.
I am planning a mobile application and a cloud service to require "Google calendar is sync with the calendars on mobile devices" ( namely iPhone, iPad, and Android )
On Android, I can read calendar's event id from our Android app. If I change event attributes such as tile and time etc, the event id stays unchanged, and it seems to be a good way to associate our meta data to it (i.e. event id).
On iOS side, if I enable Google Sync, the events I defined on web still appear on the calendar on iOS. My question is "Can I problematically get event id that are assigned on Google Calendar?"
The following link says
"EKEvent's eventIdentifier is likely to be changed when event changes"
http://developer.apple.com/library/ios/#documentation/EventKit/Reference/EKEventClassRef/Reference/Reference.html#//apple_ref/occ/instm/EKEvent/eventIdentifier
... so my guess is that this field does not reflect event id from Google calendar.
I appreciate any suggestions.
Usually the event identifier is of the form:
88E45678-2S11-574E-ABF8-3B1E463ERF4C:google_calendar_id#google.com
for a google sync calendar event.
If there was a change made to one of the recurring calendar events the identifier can also have exception date at the end:
88E45678-2S11-574E-ABF8-3B1E463ERF4C:google_calendar_id#google.com<!ExceptionDate>20121025