ios - How to define recurrence events model in Core Data -


i trying make calendar app. want persist events core data. situation this, if want recurring event "every day @ 6 wake me up". how define event model in core data? , should calculate events on next year, , save these events core data, or save 1 event core data have recurrence rule set "every day @ 6 am". there tutorial online can learn about?

that depends on how big application (how many features have).

  • if doesn't have features, second idea way go - have flag in core-data entity of "recurring" set it's recurring event. load events core-data model , filter recurring events normal ones. now, set local/remote notifications based on logic.
  • otherwise, can create more abstract abstract entity "event" , entities inherit like: "normal event", "recurring event" - each fulfilling own logic. way, when load entities core-data model, fetch every "event" entity (which both normal , recurring) , apply logic need.

you can explore of projects here see calendar application references.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -