I am using Core Store in Swift for a MacOS project and I want to schedule Employees (modeled with `CoreStoreSchema`) into shifts (mathematically using WCSP). It's more complicated than that, but that is the basics.
I have here my Employee table, which I want to have multiple calendar events to represent when the employee is available. I also want to assign a int value with each event.
class Employee: CoreStoreObject {
@Field.Stored("name")
var name: String = ""
// Here I want to store an array of Normal/Repeating Events
@Field.Stored("timeFrames")
var timeFrames: Array<EkEvent>
}
For simplicity I only provided a single table with reduced data
What I need to model:
Normal and repeating events in same Array
the repeating attributes (If repeating)
Time start and end
Day
Reasons I don't want to use the EKEventStore:
It would decrease performance(Since it pulls from a different store) and complicate things with Core Store
I already have a store, and I don't want the events to be put on the user's calendar
Reasons I haven't modeled my own Calendar Events using Core Store:
I would just be rewriting the events from
EventKitEventKit has time zone features and other convent features that would be hard to replicate
If you want the full tables: PasteBin (just note it doesn't come with explanations)
Assuming I understood you correctly, I don't think you need EventKit. The two frameworks provided by Apple are for integration with their Calendar store (which then gets your event data into their first party Calendar.app).
The UI framework allows you to put Apple provided (and somewhat consistent Apple-styled UI) into your custom app. Most of these classes are built assuming you are using the underlying
Eventkit.But if you have your own events and your own UI, Apple provides the timezone, date, date formatting, and calendar-type support outside of EventKit.