6

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?

mozkarakoc
  • 269
  • 6
  • 14

3 Answers3

9

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!

epologee
  • 11,229
  • 11
  • 68
  • 104
  • Guys this is basic ObjC. "Send attendees" means send an "attendees" message to an EKEvent object, to receive an array of participants. In C++ terms you would say "call getAttendees() on..." or "call myEvent.getAttendees()", but in ObjC it's basically "[myEvent attendees]" (which you could convert to dot-syntax, but it is still sending a message!). – daniel.gindi Dec 09 '13 at 15:21
  • This question was asked over a year ago by someone who didn't care to check an answer and has to date collected a rep of 77. It's not worth both our efforts. That said, what's up with your condescending "guys/basic" attitude? – epologee Dec 09 '13 at 20:59
  • 1
    It is not meant to be condescending, but friendly... I'll try to change that :-) – daniel.gindi Dec 10 '13 at 06:04
1

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...

AlexK
  • 638
  • 6
  • 12
0

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.

WeZZard
  • 3,536
  • 1
  • 23
  • 26