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?
有谁知道这样做的方法?或者我是否必须创建一个ics文件并发送?
1 个解决方案
#1
3
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.
该系统提供多种标准服务,例如将项目复制到粘贴板,将内容发布到社交媒体网站,通过电子邮件或SMS发送项目等。
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.
(尚未)共享EKEvent对象及其父EKCalendarItem是不可能的,因为没有一种标准服务提供与这种类型的活动交互的方式。
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).
您确实应该创建一个.ics文件来共享您的活动。有点奇怪,iOS不会自动转换对象,因为它对字符串(到.txt文件)这样做。
You could however fill in a request to get this option.
但是,您可以填写获取此选项的请求。
#1
3
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.
该系统提供多种标准服务,例如将项目复制到粘贴板,将内容发布到社交媒体网站,通过电子邮件或SMS发送项目等。
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.
(尚未)共享EKEvent对象及其父EKCalendarItem是不可能的,因为没有一种标准服务提供与这种类型的活动交互的方式。
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).
您确实应该创建一个.ics文件来共享您的活动。有点奇怪,iOS不会自动转换对象,因为它对字符串(到.txt文件)这样做。
You could however fill in a request to get this option.
但是,您可以填写获取此选项的请求。