通过WatchConnectivity从iOS转移对象到WatchOS
我正在尝试将EventKit数据传输到ekcalendars
/ekevents
/ekreminder
通过watchconnectivity
从iOS到watchos。
该连接有效,但我无法直接推动这些对象进行响应。我也不能使用nskeyedarachiver
,因为ekcalendars(示例)无法将其转换为数据。
因此,是否知道如何将简单的EventKit数据从iOS传输到WatchOS?
另一个提示:我已经在WatchOS中获取了这些数据(因此没有解决方案),但是如果设备具有MDM配置文件,则除了假期日历以外的任何东西,所以我只想测试iPhone是否可以获取更多(因为MDM配置文件存储在iPhone上,而不是在手表上),但我无法传输这些数据槽观看连接性。
I am trying to transfer EventKit Data like EKCalendars
/ EKEvents
/ EKReminder
from iOS to watchOS via WatchConnectivity
.
The connection works but I cannot push these objects directly in response. I also cannot use NSKeyedArchiver
since EKCalendars (example) are not able to get converted to Data.
So, any Idea how I can transfer simple EventKit Data from iOS to watchOS?
An additional hint: I am already fetching these data within watchOS (so no solution) but if the device has an MDM profile it cannot fetch anything but the holiday calendar so I just wanted to test if the iPhone can fetch more (since the MDM profile is stored on iPhone, not on watch) but I can't transfer these data trough WatchConnectivity.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将对象序列化以串制,传输和验证回到所需的对象。可能不是最好的方法,但对我有用。
You can serialize objects to String, transmit, and deserialize back to the object you need. Probably not the best way, but worked for me.