I have a watchOS (only) app and fetching calendars and events for these calendars. In my Watch App I have set the calendar app to mirror the calendars from iPhone. When I now uncheck a calendar on iPhone as active my app still get this disabled calendar when fetching all calendars.
Why do I get disabled calendars from EventKit? This is the line I am using to fetch calendars:
EKEventStore().calendars(for: .event)
Also the problem occurs when I set calendars not to mirror, instead set custom calendars for the watch still all calendars got fetched.
How can I just fetch the calendars that are really active.
The calendars only have these properties, so nothing where I can check if active or not:
EKCalendar <0x127fb6f0> {title = Test1; type = CalDAV; allowsModify = NO; color = #1BADF8;}
Any ideas?
I had submit an apple TSI. The result is that this functionality is not supported. The answer:
We have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.
Related
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.
Does EKEventStore allow the creation of "private" reminders, i.e. reminders that will be visible only to my app (the one that calls against the EventKit -- iOS events API) but not e.g. to Apple's default reminders app (for either iOS or OS X)?
The EKEventStore provides access to the calendar/reminder resources that are available to the OS that are configured by the user.
It is not possible to configure a separate event store for private developer use.
Reminders can be made local so they are not synced in the cloud.
However, if the device has reminder lists that are synced to the cloud, then it is no longer possible to access the local reminders either by your app or the Reminders app.
This same behavior seems to apply to local Calendars where I answered a question about their availability at Local EKCalendar saved with not errors, disappears.
The question at Unable to create local EKCalendar (Reminders) if iCloud is set to not sync Reminders seems to support my conclusions and suggests this behavior has been present for at least a couple of years.
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 am developing a Calendar App. In which calendars can be create by user and also need the iCloud Syncing feature so that user can get the same calendars on his/her other device. Now according to Apple Document:
A full sync with the calendar will lose this identifier. You should have a plan for dealing with a calendar whose identifier is no longer fetchable by caching its other properties.
CalendarIdentifier property of EKCalendar is not reliable. And using other properties we can not differentiate the calendar as well that it is made by iOS Native Calendar App or My Calendar App. So I am stuck here and trying to find any reliable solution. But not able to find till now so please help me for this to get the solution. I will be thankful to you.
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