Dim ev As CalendarEvent = store.CreateEvent
Dim newEvent As NativeObject = ev
Dim attendee As NativeObject
attendee.Initialize("EKParticipant")
Dim url As NativeObject
url.Initialize("NSURL")
url = url.RunMethod("URLWithString:", Array("mailto:" & "....@yahoo.com"))
Dim attend As List
attend.Initialize
attend.Add(url)
attendee.SetField("URL", attend)
newEvent.SetField("attendees", Array(attendee))
and I've got error like this
B4X:
[<EKParticipant 0x1f64fca80> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key URL.
Please post the link to the property documentation that you want to set. If it is a field that you see with the debugger and it isn't documented then you will not be able to call it.
Please post the link to the property documentation that you want to set. If it is a field that you see with the debugger and it isn't documented then you will not be able to call it.
Do not create EKParticipant objects directly. Instead, use the property attendees on EKCalendarItem to return an array of EKParticipant objects.
EventKit cannot add participants to an event nor change participant information. Use the properties in this class to get information about a participant.
A participant can be a person, group, room, or other resource.
I know, I already use EkCalendarItem when I want to get information about attendees.
But my question is, how to set the email as invitees when I save / update an event? Or I can't do that?
My goal is to add some invitees to an EKEvent. I've looked into other questions like this, such as this one, but all say that it is essentially impossible to add EKParticipants to an EKEvent
My goal is to add some invitees to an EKEvent. I've looked into other questions like this, such as this one, but all say that it is essentially impossible to add EKParticipants to an EKEvent
Dim attendees As List
attendees.Initialize
Dim attendee As NativeObject
attendee.Initialize("EKAttendee")
attendee.SetField("emailAddress", ".....@yahoo.com")
attendees.Add(attendee)
newEvent.SetField("attendees", attendees)