The title pretty much says it all. What follows is my best guess, but the event just doesn't appear at all.
NSArray *items = @[string, URL, (EKEvent *)[self createCalendarEvent]];
UIActivityViewController* activity = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:activities];
[self presentViewController:activity animated:YES completion:NULL];
Does anyone know of a way to accomplish this? Or do I have to create an ics file and send that?
UIActivityViewController:
The system provides several standard services, such as copying items to the pasteboard, posting content to social media sites, sending items via email or SMS, and more.
Apps can also define custom services.
It's not (yet) possible to share an EKEvent-object
nor its parent EKCalendarItem
as none of the standard services provide a way to interact with this type of activity.
You should indeed create an .ics-file
to share your event. It's a bit strange that iOS doesn't convert the object by itself as it do this for strings (into .txt-files).
You could however fill in a request to get this option.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With