Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7629031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:43:55+00:00 2026-05-31T05:43:55+00:00

I’m working on an app that has a reminder component. I’m using Calendar Store

  • 0

I’m working on an app that has a reminder component. I’m using Calendar Store to get a list of calendars, and I want the user to choose which calendar they’d like to add a task to. The problem is, CalCalendar seems not to distinguish between event calendars and task calendars.

NSArray* calendars = [[CalCalendarStore defaultCalendarStore] calendars];
for( CalCalendar* aCalendar in calendars ) {
    if( aCalendar.isEditable ) {
        NSLog( @"editable calendar: %@", aCalendar );
    }
}

This outputs:

editable calendar: CalCalendar <0x6e04d10> {UID = 8AA8FFAD-D781-47F7-9231-CF66E1753983; title = Work; notes = (null); color = NSCalibratedRGBColorSpace 0.054902 0.380392 0.72549 1; type = CalDAV; editable = 1}
editable calendar: CalCalendar <0x6e05000> {UID = A7F4A1B2-D1CF-4A20-9F84-CD1A1E99773E; title = Home; notes = ; color = NSCalibratedRGBColorSpace 0.72549 0.054902 0.156863 1; type = CalDAV; editable = 1}
editable calendar: CalCalendar <0x6e050f0> {UID = 43B14D2A-9976-461C-8EFE-5FA029381828; title = Personal; notes = (null); color = NSCalibratedRGBColorSpace 0.901961 0.784314 0 1; type = CalDAV; editable = 1}
editable calendar: CalCalendar <0x6e05140> {UID = F42EC365-20AC-4251-B45E-FB7F169928F0; title = Mac; notes = (null); color = NSCalibratedRGBColorSpace 0.054902 0.380392 0.72549 1; type = Local; editable = 1}
editable calendar: CalCalendar <0x6e05190> {UID = FF771FF9-3969-4001-BBA4-9B7B00E80291; title = Cloud 2; notes = (null); color = NSCalibratedRGBColorSpace 0.054902 0.380392 0.72549 1; type = CalDAV; editable = 1}
editable calendar: CalCalendar <0x6e051e0> {UID = 40234537-869C-4CC2-89B9-DD4F7D36C169; title = Groceries; notes = ; color = NSCalibratedRGBColorSpace 0.443137 0.101961 0.462745 1; type = CalDAV; editable = 1}

I know that the first 2 are event calendars, and the last 4 are task lists. And, iCal definitely knows the difference, because it shows only event calendars for events, and task calendars for tasks.

But there appears to be no way via the Calendar Store APIs to determine this programmatically, unless I’m missing something.

Update: I see I’m not the only one to notice this, as I found rdar://10377730. I’ve just filed my own report, as rdar://10980542

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:43:56+00:00Added an answer on May 31, 2026 at 5:43 am

    I’m not super happy with it, but the workaround I’m using now is to simply try to create a task in each calendar. If you try to create a task in an event calendar, you’ll get an error. It looks a little something like:

    - (BOOL) isCalendarAUsableTaskList:(CalCalendar*)aCalendar
    {
        if( !aCalendar.isEditable ) return NO;
    
        // Try to make a task here.
        CalTask* newTask = [CalTask task];
        newTask.calendar = aCalendar;
        newTask.title = @"Test Item";
        NSError* anError = nil;
        if( ![[CalCalendarStore defaultCalendarStore] saveTask:newTask error:&anError] ) {
            // Couldn't make a task, this calendar is no bueno.
            NSLog( @"Error saving task to calendar %@ (%@)", aCalendar.title, [anError localizedDescription] );
            return NO;
        }
    
        // Created a task.  Now clean up on our way out.
        NSLog( @"Saved task to calendar %@", aCalendar.title );
        [[CalCalendarStore defaultCalendarStore] removeTask:newTask error:nil];
    
        return YES;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I want to count how many characters a certain string has in PHP, but
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Basically, what I'm trying to create is a page of div tags, each has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.