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.
Related
At the moment I am creating an iOS app with Swift.
In the app I want among others one of my shared iCloud calendars to be displayed.
It would be best if this iOS calendar is just displayed within the app.
An important feature is that if I add an event in my shared calendar it should of course also be added to the app.
An amazing but optional feature would be:
My AppleID of course can edit the calendar. If the app would recognise that I am using a device with an AppleID that is allowed to edit the calendar so that I would be able to edit the calendar.
To sum it up: it would be best if in my app the iOS calendar is just embedded.
Thank you for your help
I think this is what you looking for https://developer.apple.com/documentation/eventkit
EventKit is the way to read from the calendar.
After that, you can choose how to display the events that you get. The easiest way for me was in a UITableView.
Is it possible to redirect a user to Calendar app New Event screen programmatically with populated start and end dates? I am aware of Introduction to Calendars and Reminders, but that seems to be an overkill. I have also tried calshow://, but didn't seem to work either or I am couldn't find a correct scheme.
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.
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.