I was wondering how you actually remove objects from the Calendar 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 calendar store?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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: