I was wondering how you actually remove objects from the Calender Store, I've looked at the documentation and it only mentions how to add objects but nothing about removing.
How would I remove an object from the calender store?
I was wondering how you actually remove objects from the Calender Store, I've looked at the documentation and it only mentions how to add objects but nothing about removing.
How would I remove an object from the calender store?
How would I remove an object from the calender store?
Buy out their stock!
Serious answer: The CalCalendarStore object responds to two messages that remove a calendar item: one for events, the other for tasks. Use whichever one is appropriate to the item you want to remove.
As Peter points out in his comment; it isn't enough to identify a CalTask just by it's title.
So, how do you uniquely identify a task?
If you look at the documentation for CalTask you will see that it is a sub-class. The super-class has a property which you can use to uniquely identify objects of that super-class, and because CalTask is a sub-class, it too has that property.
Have a look at the code that you used to create those tasks in iCal. When you create each task you can inspect its properties for that property and store it in your model. Then, when you come to delete the tasks from iCal, you can use that property to uniquely identify the task that is to be deleted.
I make no apologies for not being more specific in this answer. You'll need to read the documentation and try and write this for yourself. You'll need to make changes in more than one place in your app: