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 9246819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:34:55+00:00 2026-06-18T09:34:55+00:00

How can I show an error when there is no permission? (E.g. You don’t

  • 0

How can I show an error when there is no permission? (E.g. “You don’t give us the persmission to write in your calendar.”).

This is my code :

if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0")) {

EKEventStore *es = [[EKEventStore alloc] init];
[es requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
    /* This code will run when uses has made his/her choice */
}];
}
        NSDateFormatter *   dateFormatter = [[NSDateFormatter alloc] init];
        [dateFormatter setDateFormat:@"ddMMyy"];

        NSString *fechainicio = datum;
        NSString *fechafin = datum;
        titel = [NSString stringWithFormat:@"%@ (%@)", titel, plaatslabel.text];

        NSDate * date = [[NSDate alloc] init];
        date = [dateFormatter dateFromString:fechainicio];
        NSDate * date2 = [[NSDate alloc] init];
        date2 = [dateFormatter dateFromString:fechafin];

        EKEventStore *eventStore = [[EKEventStore alloc] init];

        EKEvent *event  = [EKEvent eventWithEventStore:eventStore];
        event.title     = @"Optreden Ronald Goedemondt";
        event.location = titel;
        event.allDay = YES;

        event.startDate = date;
        event.endDate   = date2;

        [event setCalendar:[eventStore defaultCalendarForNewEvents]];
        NSError *err;
        [eventStore saveEvent:event span:EKSpanThisEvent error:&err];

WBSuccessNoticeView *notice = [WBSuccessNoticeView successNoticeInView:self.view title:@"Show geplaatst in uw agenda."];
[notice show];
  • 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-06-18T09:34:57+00:00Added an answer on June 18, 2026 at 9:34 am

    granted will be either YES if access has been granted or NO otherwise.
    Also, you should make sure that you only call -requestAccessToEntityType:completion: when it’s necessary to do so:

    EKEventStore *es = [[EKEventStore alloc] init];
    EKAuthorizationStatus authorizationStatus = [EKEventStore authorizationStatusForEntityType:EKEntityTypeEvent];
    BOOL needsToRequestAccessToEventStore = (authorizationStatus == EKAuthorizationStatusNotDetermined);
    
    if (needsToRequestAccessToEventStore) {
       [es requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) {
            if (granted) {
                // Access granted
            } else {
                // Denied
            }
        }];
    } else {
        BOOL granted = (authorizationStatus == EKAuthorizationStatusAuthorized);
        if (granted) {
            // Access granted
        } else {
            // Denied
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I show custom error pages in codeigniter. Ex : There are some
My code can detect { bracket error, if in file there is only }
how can I show users success/error messages without creating a node for it? Thanks
I would like to know how I can show the output from this piece
can anyone recommend a website crawler that can show me all of the links
It seems that we can show layers and even use a different zPosition for
if so can show simple example, ex in jquery ajax.post
How I can show only 2 posts on my websites first page? I am
I know that you can show current GPS moving location on map with WP7
How i can show a close button after certain elapsed, i tried settimeout but

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.