I am curious if there is a way to use the capabilities of EventKit - creating events, recurrence rules, etc. - without actually having to interface with the Calendar and Reminders apps?
A little more detail on requirements and such:
A user launches my app, and creates a new event-style entry there
The event-style entry does not actually appear in the Reminders or Calendar app
My app can still access the event-style entry and its related options
Note: There could/would be a preference option to make the created event-style entries visible in the Reminders/Calendar app.
Basically, to achieve the ability to use or not use the Reminders/Calendar apps, I don't want to have to write two versions of the code - one using my own EventKit-esque implementation - and the other using the real EventKit framework APIs.
Nope—EventKit is designed to work with the existing calendar stores that Calendar and Reminders have access to. If you want to create events that they don’t know about, you have to roll your own calendar store. You can certainly model it after EventKit for relative ease of switching between the two, but you’ll need to reimplement whatever parts of the API’s functionality you’re planning to use.
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.
My react-native app needs to create a calendar event, it doesn't need to view, edit or delete event. I tried to use few react-native libraries which handle calendar but I needed to grant permissions for a calendar in each of them.
I have no knowledge of Objective C or Swift, but I would like to know if it is even possible in either native or react-native way.
Every advice is very appreciated. Thanks!
Short answer is no.
You do need to be granted permission to create a calendar event.
The Human Interface Guidelines section about requesting permissions
Users must grant permission for an app to access personal information, including the current location, calendar, contact information, reminders, and photos. Although people appreciate the convenience of using an app that has access to this information, they also expect to have control over their private data. For example, people like being able to automatically tag photos with their physical location or find nearby friends, but they also want the option to disable such features.
In the apple docs it specifies that you need to add an entry to the info.plist. This text is used when the permission is requested.
Important: If your iOS app links on or after iOS 10.0 and you need to access Calendar data, be sure to include the NSCalendarsUsageDescription key in your Info.plist file.
Your app will crash without this key added to the info.plist.
This is the case for native apps, so the same will apply for react-native.
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.