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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:16:58+00:00 2026-06-11T00:16:58+00:00

I am developing one simple application related to iPhone calendar. I am able to

  • 0

I am developing one simple application related to iPhone calendar. I am able to add the calendar event to from my application to iPhone calendar. As soon as I save event I need to get the saved event ID . How can i achieve this. Below is the code for saving an event.

EKEventStore *eventStore = [[EKEventStore alloc] init]; 
EKEvent *event  = [EKEvent eventWithEventStore:eventStore]; 
event.title     = @"xxx"; 
event.notes = @"yyy";   
event.startDate = [[NSDate alloc] init];
event.endDate   = [[NSDate alloc] initWithTimeInterval:600 sinceDate:event.startDate]; 
[event setCalendar:[eventStore defaultCalendarForNewEvents]];
NSError *err;
[eventStore saveEvent:event span:EKSpanThisEvent error:&err];    

Thanks in advance.

  • 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-11T00:16:59+00:00Added an answer on June 11, 2026 at 12:16 am

    For Saving the event call this method , and print all save event with identifiers…

    - (void)eventEditViewController:(EKEventEditViewController *)controller
    didCompleteWithAction:(EKEventEditViewAction)action {
    
    NSError *error = nil;
    
    EKEvent *thisEvent = controller.event;
    
    switch (action) {
    case EKEventEditViewActionCanceled:
    // Edit action canceled, do nothing.
    break;
    
    case EKEventEditViewActionSaved:
    // When user hit "Done" button, save the newly created event to the event store,
    // and reload table view.
    // If the new event is being added to the default calendar, then update its
    // eventsList.
    if (self.defaultCalendar ==  thisEvent.calendar) {
    
    [self.eventsList addObject:thisEvent];
    }
    
    [controller.eventStore saveEvent:controller.event span:EKSpanThisEvent error:&error];
    **NSLog(@"thisEvent.id = %@", thisEvent.eventIdentifier);**
    [self.tableView reloadData];
    break;
    
    case EKEventEditViewActionDeleted:
    // When deleting an event, remove the event from the event store,
    // and reload table view.
    // If deleting an event from the currenly default calendar, then update its
    // eventsList.
    if (self.defaultCalendar ==  thisEvent.calendar) {
    [self.eventsList removeObject:thisEvent];
    }
     **NSLog(@"thisEvent.id = %@", thisEvent.eventIdentifier);**
    [controller.eventStore removeEvent:thisEvent span:EKSpanThisEvent error:&error];
    [self.tableView reloadData];
    break;
    
    default:
    break;
    }
    // Dismiss the modal view controller
    [controller dismissModalViewControllerAnimated:YES];
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

iam developing one application.In that i need to get the music files from the
iam developing one application.In that i need to get the how many music files
Iam developing one application.In that iam using the uilabels.And my problem is i need
Iam developing one application.In that i take the string from array and replace .xml
I am developing a simple WinAPI application and started from writing my own assertion
I am developing a simple game part of application where i need to create
I would like to start developing an application for Ipad (a simple one). My
I am developing an application for iPhone that needs to be able to update
i am developing one simple application for android mobile here i am using two
I'm developing simple Silverlight 4 application based on one-to-many association. The model of relation

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.