How to add some additional fields to EKEvent

前端 未结 1 750
梦谈多话
梦谈多话 2021-01-19 04:11

One solution could be:

Creating a new model EKEventExt and add a One-to-One relationship between them, I\'m not sure whether it\'s doable, since E

相关标签:
1条回答
  • 2021-01-19 05:03

    It would be possible to append custom fields to calendar formats such as iCal (like x-my-field), there is no EKEvent property like .customFields etc. Saying this, unfortunately it's not possible to store your custom data in any fields. It would be possible to create your own iCal file and then specify your custom fields, but they will get lost really quick.

    I suggest you use your data, convert it to strings or an identfier and store it in the URL or the Notes field. This ensures, your data will be transferred into the calendar and synced anywhere. If you want the user to be unable to read your custom data, use a base64 version of the string. This is how I'm doing it and it works quite well.

    To answer your upcoming question: No, unfortunately it's not possible to make one of those fields read-only...

    0 讨论(0)
提交回复
热议问题