mozkarakoc
mozkarakoc

Reputation: 269

Add participant to an event in iOS

In the EKParticipant Class reference, " Send attendees to an EKEvent object to get an array of EKParticipant objects. " OK, buy how can I send attendees to an EKEvent object?

Someone give example code?

Upvotes: 6

Views: 3379

Answers (3)

AlexK
AlexK

Reputation: 638

The only way WeekCal can do this legally (via API contract) is by talking to the iCloud servers to add the attendees, which then get synced back down to the device. I'd love to see proof that it is touching the iOS event store...

Upvotes: 1

WeZZard
WeZZard

Reputation: 3546

You would always fail to create attendees by using EventKit this version because Apple has not get related APIs public.

But you can use class-dump to output EventKit header files to see all interfaces even included the private and try it out one by one.

I've seen an app called Week Cal could add attendees into iOS event store, and it is an Appstore-sale app and no jailbroken needed. So I believe that there is a way to add attendees into event store in current iOS and would not be rejected by Apple.

Upvotes: 0

epologee
epologee

Reputation: 11319

The iOS reference says the following:

You do not create EKParticipant objects directly. Send attendees to an EKEvent object to get an array of EKParticipant objects.

Unfortunately that attendees property is read-only and the ways that these EKParticipant's come into existence is omitted from the reference. It has lead me to believe that the only way to create new participants, is by using the EKEventEditViewController (from the EventKitUI framework).

Very unsatisfying, I know, so please let there be someone else with a better answer!

Upvotes: 9

Related Questions